[seahorse] Rename SeahorseViewer to SeahorseCatalog



commit 34636664c23e8d7d17d244b7364e287e43df23a6
Author: Stef Walter <stefw collabora co uk>
Date:   Mon Dec 12 06:40:18 2011 +0100

    Rename SeahorseViewer to SeahorseCatalog
    
     * Since we want to use the name 'viewer' for viewing specific items.
     * The SeahorseCatalog represents a list of items in the main window
       and in the key server listing

 gkr/seahorse-gkr-backend.c                         |    1 -
 libseahorse/Makefile.am                            |    2 +-
 libseahorse/seahorse-actions.h                     |    2 +-
 .../{seahorse-viewer.c => seahorse-catalog.c}      |  160 ++++++++++----------
 libseahorse/seahorse-catalog.h                     |   82 ++++++++++
 libseahorse/seahorse-viewer.h                      |   82 ----------
 pgp/seahorse-keyserver-results.c                   |   52 +++---
 pgp/seahorse-keyserver-results.h                   |    6 +-
 pkcs11/seahorse-interaction.h                      |    1 -
 src/seahorse-key-manager.c                         |   58 ++++----
 src/seahorse-key-manager.h                         |    6 +-
 11 files changed, 225 insertions(+), 227 deletions(-)
---
diff --git a/gkr/seahorse-gkr-backend.c b/gkr/seahorse-gkr-backend.c
index 425c96f..28a06ff 100644
--- a/gkr/seahorse-gkr-backend.c
+++ b/gkr/seahorse-gkr-backend.c
@@ -29,7 +29,6 @@
 #include "seahorse-backend.h"
 #include "seahorse-progress.h"
 #include "seahorse-registry.h"
-#include "seahorse-viewer.h"
 
 #include <gnome-keyring.h>
 
diff --git a/libseahorse/Makefile.am b/libseahorse/Makefile.am
index ae6d681..d2b43bf 100644
--- a/libseahorse/Makefile.am
+++ b/libseahorse/Makefile.am
@@ -32,6 +32,7 @@ libseahorse_la_SOURCES = \
 	seahorse-actions.c seahorse-actions.h \
 	seahorse-backend.c seahorse-backend.h \
 	seahorse-bind.c seahorse-bind.h \
+	seahorse-catalog.c seahorse-catalog.h \
 	seahorse-cleanup.c seahorse-cleanup.h \
 	seahorse-collection.c seahorse-collection.h \
 	seahorse-context.c seahorse-context.h \
@@ -60,7 +61,6 @@ libseahorse_la_SOURCES = \
 	seahorse-types.c seahorse-types.h \
 	seahorse-util.c seahorse-util.h \
 	seahorse-validity.c seahorse-validity.h \
-	seahorse-viewer.c seahorse-viewer.h \
 	seahorse-widget.c seahorse-widget.h \
 	$(MARSHAL_SRCS) \
 	$(KEYSERVER_SRCS)
diff --git a/libseahorse/seahorse-actions.h b/libseahorse/seahorse-actions.h
index 9fdcce1..a4c9cd9 100644
--- a/libseahorse/seahorse-actions.h
+++ b/libseahorse/seahorse-actions.h
@@ -26,7 +26,7 @@
 #include <gtk/gtk.h>
 
 #include "seahorse-object.h"
-#include "seahorse-viewer.h"
+#include "seahorse-catalog.h"
 
 #define SEAHORSE_TYPE_ACTIONS                  (seahorse_actions_get_type ())
 #define SEAHORSE_ACTIONS(obj)                  (G_TYPE_CHECK_INSTANCE_CAST ((obj), SEAHORSE_TYPE_ACTIONS, SeahorseActions))
diff --git a/libseahorse/seahorse-viewer.c b/libseahorse/seahorse-catalog.c
similarity index 77%
rename from libseahorse/seahorse-viewer.c
rename to libseahorse/seahorse-catalog.c
index 8930dbf..80e852e 100644
--- a/libseahorse/seahorse-viewer.c
+++ b/libseahorse/seahorse-catalog.c
@@ -32,7 +32,7 @@
 #include "seahorse-progress.h"
 #include "seahorse-registry.h"
 #include "seahorse-util.h"
-#include "seahorse-viewer.h"
+#include "seahorse-catalog.h"
 
 #include <gcr/gcr.h>
 
@@ -47,7 +47,7 @@ enum {
 	PROP_WINDOW
 };
 
-struct _SeahorseViewerPrivate {
+struct _SeahorseCatalogPrivate {
 	GtkUIManager *ui_manager;
 	GHashTable *actions;
 	GtkAction *edit_delete;
@@ -57,7 +57,7 @@ struct _SeahorseViewerPrivate {
 	GList *selection_actions;
 };
 
-G_DEFINE_TYPE (SeahorseViewer, seahorse_viewer, SEAHORSE_TYPE_WIDGET);
+G_DEFINE_TYPE (SeahorseCatalog, seahorse_catalog, SEAHORSE_TYPE_WIDGET);
 
 /* -----------------------------------------------------------------------------
  * INTERNAL
@@ -68,12 +68,12 @@ G_MODULE_EXPORT void
 on_app_preferences (GtkAction* action,
                     gpointer user_data)
 {
-	SeahorseViewer* self = SEAHORSE_VIEWER (user_data);
-	seahorse_preferences_show (seahorse_viewer_get_window (self), NULL);
+	SeahorseCatalog *self = SEAHORSE_CATALOG (user_data);
+	seahorse_preferences_show (seahorse_catalog_get_window (self), NULL);
 }
 
 static void
-on_app_about (GtkAction* action, SeahorseViewer* self)
+on_app_about (GtkAction* action, SeahorseCatalog *self)
 {
 	GtkAboutDialog *about;
 
@@ -116,7 +116,7 @@ on_app_about (GtkAction* action, SeahorseViewer* self)
 	gtk_about_dialog_set_website_label (about, _("Seahorse Project Homepage"));
 
 	g_signal_connect (about, "response", G_CALLBACK (gtk_widget_hide), NULL);
-	gtk_window_set_transient_for (GTK_WINDOW (about), seahorse_viewer_get_window (self));
+	gtk_window_set_transient_for (GTK_WINDOW (about), seahorse_catalog_get_window (self));
 
 	gtk_dialog_run (GTK_DIALOG (about));
 	gtk_widget_destroy (GTK_WIDGET (about));
@@ -124,15 +124,15 @@ on_app_about (GtkAction* action, SeahorseViewer* self)
 
 static void
 on_help_show (GtkAction *action,
-              SeahorseViewer* self)
+              SeahorseCatalog *self)
 {
-	g_return_if_fail (SEAHORSE_IS_VIEWER (self));
+	g_return_if_fail (SEAHORSE_IS_CATALOG (self));
 	g_return_if_fail (GTK_IS_ACTION (action));
 	seahorse_widget_show_help (SEAHORSE_WIDGET (self));
 }
 
 static GList *
-lookup_actions_for_objects (SeahorseViewer *self,
+lookup_actions_for_objects (SeahorseCatalog *self,
                             GList *objects)
 {
 	GtkActionGroup *actions;
@@ -152,7 +152,7 @@ lookup_actions_for_objects (SeahorseViewer *self,
 		if (actions == NULL)
 			continue;
 		if (g_hash_table_lookup (self->pv->actions, actions) == NULL)
-			seahorse_viewer_include_actions (self, actions);
+			seahorse_catalog_include_actions (self, actions);
 		queue = g_hash_table_lookup (table, actions);
 		if (queue == NULL) {
 			queue = g_queue_new ();
@@ -177,13 +177,13 @@ static void
 on_object_delete (GtkAction *action,
                   gpointer user_data)
 {
-	SeahorseViewer *self = SEAHORSE_VIEWER (user_data);
+	SeahorseCatalog *self = SEAHORSE_CATALOG (user_data);
 	GError *error = NULL;
 	GtkWindow *window;
 	GList *objects;
 
-	window = seahorse_viewer_get_window (self);
-	objects = seahorse_viewer_get_selected_objects (self);
+	window = seahorse_catalog_get_window (self);
+	objects = seahorse_catalog_get_selected_objects (self);
 	seahorse_deletable_delete_with_prompt_wait (objects, window, &error);
 
 	if (error != NULL)
@@ -196,12 +196,12 @@ static void
 on_properties_object (GtkAction *action,
                       gpointer user_data)
 {
-	SeahorseViewer *self = SEAHORSE_VIEWER (user_data);
+	SeahorseCatalog *self = SEAHORSE_CATALOG (user_data);
 	GList *objects;
 
-	objects = seahorse_viewer_get_selected_objects (self);
+	objects = seahorse_catalog_get_selected_objects (self);
 	if (objects != NULL)
-		seahorse_viewer_show_properties (self, objects->data);
+		seahorse_catalog_show_properties (self, objects->data);
 	g_list_free (objects);
 }
 
@@ -209,27 +209,27 @@ static void
 on_properties_place (GtkAction *action,
                      gpointer user_data)
 {
-	SeahorseViewer *self = SEAHORSE_VIEWER (user_data);
+	SeahorseCatalog *self = SEAHORSE_CATALOG (user_data);
 	GList *objects;
 
-	objects = seahorse_viewer_get_selected_places (self);
+	objects = seahorse_catalog_get_selected_places (self);
 	if (objects != NULL)
-		seahorse_viewer_show_properties (self, objects->data);
+		seahorse_catalog_show_properties (self, objects->data);
 	g_list_free (objects);
 }
 
 static void
-on_key_export_file (GtkAction* action, SeahorseViewer* self)
+on_key_export_file (GtkAction* action, SeahorseCatalog *self)
 {
 	GError *error = NULL;
 	GtkWindow *window;
 	GList *objects;
 
-	g_return_if_fail (SEAHORSE_IS_VIEWER (self));
+	g_return_if_fail (SEAHORSE_IS_CATALOG (self));
 	g_return_if_fail (GTK_IS_ACTION (action));
 
-	window = seahorse_viewer_get_window (self);
-	objects = seahorse_viewer_get_selected_objects (self);
+	window = seahorse_catalog_get_window (self);
+	objects = seahorse_catalog_get_selected_objects (self);
 	seahorse_exportable_export_to_prompt_wait (objects, window, &error);
 	g_list_free (objects);
 
@@ -241,7 +241,7 @@ on_key_export_file (GtkAction* action, SeahorseViewer* self)
 
 static void
 on_key_export_clipboard (GtkAction* action,
-                         SeahorseViewer* self)
+                         SeahorseCatalog *self)
 {
 	GList* objects;
 	gpointer output;
@@ -250,10 +250,10 @@ on_key_export_clipboard (GtkAction* action,
 	GdkAtom atom;
 	GtkClipboard* board;
 
-	g_return_if_fail (SEAHORSE_IS_VIEWER (self));
+	g_return_if_fail (SEAHORSE_IS_CATALOG (self));
 	g_return_if_fail (GTK_IS_ACTION (action));
 
-	objects = seahorse_viewer_get_selected_objects (self);
+	objects = seahorse_catalog_get_selected_objects (self);
 	seahorse_exportable_export_to_text_wait (objects, &output, &size, &error);
 	g_list_free (objects);
 
@@ -264,7 +264,7 @@ on_key_export_clipboard (GtkAction* action,
 		board = gtk_clipboard_get (atom);
 		gtk_clipboard_set_text (board, output, (gint)size);
 	} else {
-		seahorse_util_handle_error (&error, seahorse_viewer_get_window (self),
+		seahorse_util_handle_error (&error, seahorse_catalog_get_window (self),
 		                            _("Couldn't export data"));
 	}
 
@@ -302,9 +302,9 @@ on_ui_manager_pre_activate (GtkUIManager *ui_manager,
                             GtkAction *action,
                             gpointer user_data)
 {
-	SeahorseViewer *self = SEAHORSE_VIEWER (user_data);
+	SeahorseCatalog *self = SEAHORSE_CATALOG (user_data);
 	seahorse_action_pre_activate_with_window (action,
-	                                          seahorse_viewer_get_window (self));
+	                                          seahorse_catalog_get_window (self));
 }
 
 static void
@@ -316,7 +316,7 @@ on_ui_manager_post_activate (GtkUIManager *ui_manager,
 }
 
 static void
-seahorse_viewer_real_selection_changed (SeahorseViewer *self)
+seahorse_catalog_real_selection_changed (SeahorseCatalog *self)
 {
 	GList *groups;
 	GList *objects;
@@ -330,7 +330,7 @@ seahorse_viewer_real_selection_changed (SeahorseViewer *self)
 	can_delete = FALSE;
 	can_export = FALSE;
 
-	objects = seahorse_viewer_get_selected_objects (self);
+	objects = seahorse_catalog_get_selected_objects (self);
 	for (l = objects; l != NULL; l = g_list_next (l)) {
 		if (seahorse_exportable_can_export (l->data))
 			can_export = TRUE;
@@ -354,7 +354,7 @@ seahorse_viewer_real_selection_changed (SeahorseViewer *self)
 	gtk_action_set_sensitive (self->pv->edit_copy, can_export);
 	gtk_action_set_sensitive (self->pv->file_export, can_export);
 
-	objects = seahorse_viewer_get_selected_places (self);
+	objects = seahorse_catalog_get_selected_places (self);
 	groups = g_list_concat (groups, lookup_actions_for_objects (self, objects));
 	g_list_free (objects);
 
@@ -373,7 +373,7 @@ on_ui_manager_add_widget (GtkUIManager *ui_manager,
                           GtkWidget *widget,
                           gpointer user_data)
 {
-	SeahorseViewer* self = SEAHORSE_VIEWER (user_data);
+	SeahorseCatalog *self = SEAHORSE_CATALOG (user_data);
 	const char* name = NULL;
 	GtkWidget* holder;
 
@@ -394,16 +394,16 @@ on_ui_manager_add_widget (GtkUIManager *ui_manager,
 }
 
 static void
-seahorse_viewer_constructed (GObject *obj)
+seahorse_catalog_constructed (GObject *obj)
 {
-	SeahorseViewer *self = SEAHORSE_VIEWER (obj);
+	SeahorseCatalog *self = SEAHORSE_CATALOG (obj);
 	GError *error = NULL;
 	GtkWidget *win;
 	const gchar *name;
 	gchar *path;
 	GtkActionGroup *actions;
 
-	G_OBJECT_CLASS (seahorse_viewer_parent_class)->constructed (obj);
+	G_OBJECT_CLASS (seahorse_catalog_parent_class)->constructed (obj);
 
 	/* The widgts get added in an idle loop later */
 	name = seahorse_widget_get_name (SEAHORSE_WIDGET (self));
@@ -436,10 +436,10 @@ seahorse_viewer_constructed (GObject *obj)
 }
 
 static void
-seahorse_viewer_init (SeahorseViewer *self)
+seahorse_catalog_init (SeahorseCatalog *self)
 {
-	self->pv = G_TYPE_INSTANCE_GET_PRIVATE (self, SEAHORSE_TYPE_VIEWER,
-	                                        SeahorseViewerPrivate);
+	self->pv = G_TYPE_INSTANCE_GET_PRIVATE (self, SEAHORSE_TYPE_CATALOG,
+	                                        SeahorseCatalogPrivate);
 	self->pv->actions = g_hash_table_new_full (g_direct_hash, g_direct_equal,
 	                                           g_object_unref, NULL);
 
@@ -453,9 +453,9 @@ seahorse_viewer_init (SeahorseViewer *self)
 }
 
 static void
-seahorse_viewer_dispose (GObject *obj)
+seahorse_catalog_dispose (GObject *obj)
 {
-	SeahorseViewer *self = SEAHORSE_VIEWER (obj);
+	SeahorseCatalog *self = SEAHORSE_CATALOG (obj);
 	GList *l;
 
 	g_clear_object (&self->pv->edit_copy);
@@ -474,30 +474,30 @@ seahorse_viewer_dispose (GObject *obj)
 
 	g_hash_table_remove_all (self->pv->actions);
 
-	G_OBJECT_CLASS (seahorse_viewer_parent_class)->dispose (obj);
+	G_OBJECT_CLASS (seahorse_catalog_parent_class)->dispose (obj);
 }
 
 static void
-seahorse_viewer_finalize (GObject *obj)
+seahorse_catalog_finalize (GObject *obj)
 {
-	SeahorseViewer *self = SEAHORSE_VIEWER (obj);
+	SeahorseCatalog *self = SEAHORSE_CATALOG (obj);
 
 	g_assert (self->pv->ui_manager == NULL);
 	g_assert (g_hash_table_size (self->pv->actions) == 0);
 	g_hash_table_destroy (self->pv->actions);
 
-	G_OBJECT_CLASS (seahorse_viewer_parent_class)->finalize (obj);
+	G_OBJECT_CLASS (seahorse_catalog_parent_class)->finalize (obj);
 }
 
 static void
-seahorse_viewer_get_property (GObject *obj, guint prop_id, GValue *value,
+seahorse_catalog_get_property (GObject *obj, guint prop_id, GValue *value,
                               GParamSpec *pspec)
 {
-	SeahorseViewer *self = SEAHORSE_VIEWER (obj);
+	SeahorseCatalog *self = SEAHORSE_CATALOG (obj);
 
 	switch (prop_id) {
 	case PROP_WINDOW:
-		g_value_set_object (value, seahorse_viewer_get_window (self));
+		g_value_set_object (value, seahorse_catalog_get_window (self));
 		break;
 	default:
 		G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, prop_id, pspec);
@@ -506,43 +506,43 @@ seahorse_viewer_get_property (GObject *obj, guint prop_id, GValue *value,
 }
 
 static void
-seahorse_viewer_class_init (SeahorseViewerClass *klass)
+seahorse_catalog_class_init (SeahorseCatalogClass *klass)
 {
 	GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
 
-	g_type_class_add_private (klass, sizeof (SeahorseViewerPrivate));
+	g_type_class_add_private (klass, sizeof (SeahorseCatalogPrivate));
 
-	gobject_class->constructed = seahorse_viewer_constructed;
-	gobject_class->dispose = seahorse_viewer_dispose;
-	gobject_class->finalize = seahorse_viewer_finalize;
-	gobject_class->get_property = seahorse_viewer_get_property;
+	gobject_class->constructed = seahorse_catalog_constructed;
+	gobject_class->dispose = seahorse_catalog_dispose;
+	gobject_class->finalize = seahorse_catalog_finalize;
+	gobject_class->get_property = seahorse_catalog_get_property;
 
-	klass->selection_changed = seahorse_viewer_real_selection_changed;
+	klass->selection_changed = seahorse_catalog_real_selection_changed;
 
 	g_object_class_install_property (gobject_class, PROP_WINDOW,
 	           g_param_spec_object ("window", "Window", "Window of View",
 	                                GTK_TYPE_WIDGET, G_PARAM_READABLE));
 
-	g_signal_new ("selection-changed", SEAHORSE_TYPE_VIEWER,
-	              G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (SeahorseViewerClass, selection_changed),
+	g_signal_new ("selection-changed", SEAHORSE_TYPE_CATALOG,
+	              G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (SeahorseCatalogClass, selection_changed),
 	              NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
 }
 
 void
-seahorse_viewer_ensure_updated (SeahorseViewer* self)
+seahorse_catalog_ensure_updated (SeahorseCatalog *self)
 {
-	g_return_if_fail (SEAHORSE_IS_VIEWER (self));
+	g_return_if_fail (SEAHORSE_IS_CATALOG (self));
 	gtk_ui_manager_ensure_update (self->pv->ui_manager);
 }
 
 void
-seahorse_viewer_include_actions (SeahorseViewer* self,
+seahorse_catalog_include_actions (SeahorseCatalog *self,
                                  GtkActionGroup* actions)
 {
 	const gchar *definition;
 	GError *error = NULL;
 
-	g_return_if_fail (SEAHORSE_IS_VIEWER (self));
+	g_return_if_fail (SEAHORSE_IS_CATALOG (self));
 	g_return_if_fail (GTK_IS_ACTION_GROUP (actions));
 
 	gtk_ui_manager_insert_action_group (self->pv->ui_manager, actions, 10);
@@ -563,7 +563,7 @@ seahorse_viewer_include_actions (SeahorseViewer* self,
 }
 
 void
-seahorse_viewer_show_context_menu (SeahorseViewer* self,
+seahorse_catalog_show_context_menu (SeahorseCatalog *self,
                                    const gchar *name,
                                    guint button,
                                    guint time)
@@ -571,7 +571,7 @@ seahorse_viewer_show_context_menu (SeahorseViewer* self,
 	GtkWidget *menu;
 	gchar *path;
 
-	g_return_if_fail (SEAHORSE_IS_VIEWER (self));
+	g_return_if_fail (SEAHORSE_IS_CATALOG (self));
 	g_return_if_fail (name != NULL);
 
 	path = g_strdup_printf ("/%s", name);
@@ -590,7 +590,7 @@ seahorse_viewer_show_context_menu (SeahorseViewer* self,
 }
 
 void
-seahorse_viewer_show_properties (SeahorseViewer* self,
+seahorse_catalog_show_properties (SeahorseCatalog *self,
                                  GObject* obj)
 {
 	GtkActionGroup *actions, *cloned;
@@ -608,38 +608,38 @@ seahorse_viewer_show_properties (SeahorseViewer* self,
 
 	action = gtk_action_group_get_action (cloned, "properties");
 	if (action != NULL)
-		seahorse_action_activate_with_window (action, seahorse_viewer_get_window (self));
+		seahorse_action_activate_with_window (action, seahorse_catalog_get_window (self));
 
 	g_object_unref (cloned);
 }
 
 GtkWindow *
-seahorse_viewer_get_window (SeahorseViewer* self)
+seahorse_catalog_get_window (SeahorseCatalog *self)
 {
-	g_return_val_if_fail (SEAHORSE_IS_VIEWER (self), NULL);
+	g_return_val_if_fail (SEAHORSE_IS_CATALOG (self), NULL);
 	return GTK_WINDOW (seahorse_widget_get_toplevel (SEAHORSE_WIDGET (self)));
 }
 
 GList *
-seahorse_viewer_get_selected_objects (SeahorseViewer* self)
+seahorse_catalog_get_selected_objects (SeahorseCatalog *self)
 {
-	g_return_val_if_fail (SEAHORSE_IS_VIEWER (self), NULL);
-	g_return_val_if_fail (SEAHORSE_VIEWER_GET_CLASS (self)->get_selected_objects, NULL);
-	return SEAHORSE_VIEWER_GET_CLASS (self)->get_selected_objects (self);
+	g_return_val_if_fail (SEAHORSE_IS_CATALOG (self), NULL);
+	g_return_val_if_fail (SEAHORSE_CATALOG_GET_CLASS (self)->get_selected_objects, NULL);
+	return SEAHORSE_CATALOG_GET_CLASS (self)->get_selected_objects (self);
 }
 
 GList *
-seahorse_viewer_get_selected_places (SeahorseViewer* self)
+seahorse_catalog_get_selected_places (SeahorseCatalog *self)
 {
-	g_return_val_if_fail (SEAHORSE_IS_VIEWER (self), NULL);
-	g_return_val_if_fail (SEAHORSE_VIEWER_GET_CLASS (self)->get_selected_places, NULL);
-	return SEAHORSE_VIEWER_GET_CLASS (self)->get_selected_places (self);
+	g_return_val_if_fail (SEAHORSE_IS_CATALOG (self), NULL);
+	g_return_val_if_fail (SEAHORSE_CATALOG_GET_CLASS (self)->get_selected_places, NULL);
+	return SEAHORSE_CATALOG_GET_CLASS (self)->get_selected_places (self);
 }
 
 GList *
-seahorse_viewer_get_backends (SeahorseViewer* self)
+seahorse_catalog_get_backends (SeahorseCatalog *self)
 {
-	g_return_val_if_fail (SEAHORSE_IS_VIEWER (self), NULL);
-	g_return_val_if_fail (SEAHORSE_VIEWER_GET_CLASS (self)->get_backends, NULL);
-	return SEAHORSE_VIEWER_GET_CLASS (self)->get_backends (self);
+	g_return_val_if_fail (SEAHORSE_IS_CATALOG (self), NULL);
+	g_return_val_if_fail (SEAHORSE_CATALOG_GET_CLASS (self)->get_backends, NULL);
+	return SEAHORSE_CATALOG_GET_CLASS (self)->get_backends (self);
 }
diff --git a/libseahorse/seahorse-catalog.h b/libseahorse/seahorse-catalog.h
new file mode 100644
index 0000000..9b1ab39
--- /dev/null
+++ b/libseahorse/seahorse-catalog.h
@@ -0,0 +1,82 @@
+/*
+ * Seahorse
+ *
+ * Copyright (C) 2008 Stefan Walter
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ */
+
+#ifndef __SEAHORSE_CATALOG_H__
+#define __SEAHORSE_CATALOG_H__
+
+#include <glib-object.h>
+
+#include "seahorse-widget.h"
+
+#define SEAHORSE_CATALOG_MENU_OBJECT   "ObjectPopup"
+
+#define SEAHORSE_TYPE_CATALOG               (seahorse_catalog_get_type ())
+#define SEAHORSE_CATALOG(obj)               (G_TYPE_CHECK_INSTANCE_CAST ((obj), SEAHORSE_TYPE_CATALOG, SeahorseCatalog))
+#define SEAHORSE_CATALOG_CLASS(klass)       (G_TYPE_CHECK_CLASS_CAST ((klass), SEAHORSE_TYPE_CATALOG, SeahorseCatalogClass))
+#define SEAHORSE_IS_CATALOG(obj)            (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SEAHORSE_TYPE_CATALOG))
+#define SEAHORSE_IS_CATALOG_CLASS(klass)    (G_TYPE_CHECK_CLASS_TYPE ((klass), SEAHORSE_TYPE_CATALOG))
+#define SEAHORSE_CATALOG_GET_CLASS(obj)     (G_TYPE_INSTANCE_GET_CLASS ((obj), SEAHORSE_TYPE_CATALOG, SeahorseCatalogClass))
+
+typedef struct _SeahorseCatalog SeahorseCatalog;
+typedef struct _SeahorseCatalogClass SeahorseCatalogClass;
+typedef struct _SeahorseCatalogPrivate SeahorseCatalogPrivate;
+
+struct _SeahorseCatalog {
+	SeahorseWidget parent;
+	SeahorseCatalogPrivate *pv;
+};
+
+struct _SeahorseCatalogClass {
+	SeahorseWidgetClass parent;
+
+	GList *          (*get_backends)                  (SeahorseCatalog *self);
+
+	GList *          (*get_selected_places)           (SeahorseCatalog *self);
+
+	GList *          (*get_selected_objects)          (SeahorseCatalog *self);
+
+	void             (*selection_changed)             (SeahorseCatalog *catalog);
+};
+
+GType               seahorse_catalog_get_type                    (void);
+
+void                seahorse_catalog_ensure_updated              (SeahorseCatalog* self);
+
+void                seahorse_catalog_include_actions             (SeahorseCatalog* self,
+                                                                  GtkActionGroup* actions);
+
+GList *             seahorse_catalog_get_selected_objects        (SeahorseCatalog* self);
+
+GList *             seahorse_catalog_get_selected_places         (SeahorseCatalog* self);
+
+GList *             seahorse_catalog_get_backends                (SeahorseCatalog* self);
+
+void                seahorse_catalog_show_context_menu           (SeahorseCatalog* self,
+                                                                  const gchar *which,
+                                                                  guint button,
+                                                                  guint time);
+
+void                seahorse_catalog_show_properties             (SeahorseCatalog* self,
+                                                                  GObject* obj);
+
+GtkWindow *         seahorse_catalog_get_window                  (SeahorseCatalog *self);
+
+#endif /* __SEAHORSE_CATALOG_H__ */
diff --git a/pgp/seahorse-keyserver-results.c b/pgp/seahorse-keyserver-results.c
index 6f74c00..f527498 100644
--- a/pgp/seahorse-keyserver-results.c
+++ b/pgp/seahorse-keyserver-results.c
@@ -58,7 +58,7 @@ struct _SeahorseKeyserverResultsPrivate {
 	GSettings *settings;
 };
 
-G_DEFINE_TYPE (SeahorseKeyserverResults, seahorse_keyserver_results, SEAHORSE_TYPE_VIEWER);
+G_DEFINE_TYPE (SeahorseKeyserverResults, seahorse_keyserver_results, SEAHORSE_TYPE_CATALOG);
 
 /* -----------------------------------------------------------------------------
  * INTERNAL
@@ -107,7 +107,7 @@ on_row_activated (GtkTreeView *view, GtkTreePath *path, GtkTreeViewColumn *colum
 
 	obj = seahorse_key_manager_store_get_object_from_path (view, path);
 	if (obj != NULL)
-		seahorse_viewer_show_properties (SEAHORSE_VIEWER (self), obj);
+		seahorse_catalog_show_properties (SEAHORSE_CATALOG (self), obj);
 }
 
 G_MODULE_EXPORT gboolean
@@ -116,8 +116,8 @@ on_key_list_button_pressed (GtkTreeView* view, GdkEventButton* event, SeahorseKe
 	g_return_val_if_fail (SEAHORSE_IS_KEYSERVER_RESULTS (self), FALSE);
 	g_return_val_if_fail (GTK_IS_TREE_VIEW (view), FALSE);
 	if (event->button == 3)
-		seahorse_viewer_show_context_menu (SEAHORSE_VIEWER (self),
-		                                   SEAHORSE_VIEWER_MENU_OBJECT,
+		seahorse_catalog_show_context_menu (SEAHORSE_CATALOG (self),
+		                                   SEAHORSE_CATALOG_MENU_OBJECT,
 		                                   event->button, event->time);
 	return FALSE;
 }
@@ -130,10 +130,10 @@ on_key_list_popup_menu (GtkTreeView* view, SeahorseKeyserverResults* self)
 	g_return_val_if_fail (SEAHORSE_IS_KEYSERVER_RESULTS (self), FALSE);
 	g_return_val_if_fail (GTK_IS_TREE_VIEW (view), FALSE);
 
-	objects = seahorse_viewer_get_selected_objects (SEAHORSE_VIEWER (self));
+	objects = seahorse_catalog_get_selected_objects (SEAHORSE_CATALOG (self));
 	if (objects != NULL)
-		seahorse_viewer_show_context_menu (SEAHORSE_VIEWER (self),
-		                                   SEAHORSE_VIEWER_MENU_OBJECT,
+		seahorse_catalog_show_context_menu (SEAHORSE_CATALOG (self),
+		                                   SEAHORSE_CATALOG_MENU_OBJECT,
 		                                   0, gtk_get_current_event_time ());
 	g_list_free (objects);
 	return TRUE;
@@ -159,7 +159,7 @@ on_remote_find (GtkAction* action, SeahorseKeyserverResults* self)
 {
 	g_return_if_fail (SEAHORSE_IS_KEYSERVER_RESULTS (self));
 	g_return_if_fail (GTK_IS_ACTION (action));
-	seahorse_keyserver_search_show (seahorse_viewer_get_window (SEAHORSE_VIEWER (self)));
+	seahorse_keyserver_search_show (seahorse_catalog_get_window (SEAHORSE_CATALOG (self)));
 }
 
 static void
@@ -167,12 +167,12 @@ on_import_complete (GObject *source,
                     GAsyncResult *result,
                     gpointer user_data)
 {
-	SeahorseViewer *self = SEAHORSE_VIEWER (user_data);
+	SeahorseCatalog *self = SEAHORSE_CATALOG (user_data);
 	GError *error = NULL;
 
 	if (!seahorse_pgp_backend_transfer_finish (SEAHORSE_PGP_BACKEND (source),
 	                                           result, &error))
-		seahorse_util_handle_error (&error, seahorse_viewer_get_window (self),
+		seahorse_util_handle_error (&error, seahorse_catalog_get_window (self),
 		                            _("Couldn't import keys"));
 
 	g_object_unref (self);
@@ -194,17 +194,17 @@ objects_prune_non_exportable (GList *objects)
 }
 
 static void
-on_key_import_keyring (GtkAction* action, SeahorseViewer* self)
+on_key_import_keyring (GtkAction* action, SeahorseCatalog* self)
 {
 	GCancellable *cancellable;
 	SeahorsePgpBackend *backend;
 	SeahorseGpgmeKeyring *keyring;
 	GList* objects;
 
-	g_return_if_fail (SEAHORSE_IS_VIEWER (self));
+	g_return_if_fail (SEAHORSE_IS_CATALOG (self));
 	g_return_if_fail (GTK_IS_ACTION (action));
 
-	objects = seahorse_viewer_get_selected_objects (self);
+	objects = seahorse_catalog_get_selected_objects (self);
 	objects = objects_prune_non_exportable (objects);
 
 	/* No objects, nothing to do */
@@ -257,14 +257,14 @@ static const GtkActionEntry IMPORT_ENTRIES[] = {
 };
 
 static GList *
-seahorse_keyserver_results_get_selected_objects (SeahorseViewer* viewer)
+seahorse_keyserver_results_get_selected_objects (SeahorseCatalog *catalog)
 {
-	SeahorseKeyserverResults * self = SEAHORSE_KEYSERVER_RESULTS (viewer);
+	SeahorseKeyserverResults * self = SEAHORSE_KEYSERVER_RESULTS (catalog);
 	return seahorse_key_manager_store_get_selected_objects (self->pv->view);
 }
 
 static GList *
-seahorse_keyserver_results_get_selected_places (SeahorseViewer* viewer)
+seahorse_keyserver_results_get_selected_places (SeahorseCatalog *catalog)
 {
 	return NULL;
 }
@@ -296,7 +296,7 @@ seahorse_keyserver_results_constructor (GType type, guint n_props, GObjectConstr
 		title = g_strdup_printf (_ ("Remote Keys Containing '%s'"), self->pv->search_string);
 	}
 
-	window = seahorse_viewer_get_window (SEAHORSE_VIEWER (self));
+	window = seahorse_catalog_get_window (SEAHORSE_CATALOG (self));
 	gtk_window_set_title (window, title);
 	g_free (title);
 
@@ -305,18 +305,18 @@ seahorse_keyserver_results_constructor (GType type, guint n_props, GObjectConstr
 	actions = gtk_action_group_new ("general");
 	gtk_action_group_set_translation_domain (actions, GETTEXT_PACKAGE);
 	gtk_action_group_add_actions (actions, GENERAL_ENTRIES, G_N_ELEMENTS (GENERAL_ENTRIES), self);
-	seahorse_viewer_include_actions (SEAHORSE_VIEWER (self), actions);
+	seahorse_catalog_include_actions (SEAHORSE_CATALOG (self), actions);
 
 	actions = gtk_action_group_new ("keyserver");
 	gtk_action_group_set_translation_domain (actions, GETTEXT_PACKAGE);
 	gtk_action_group_add_actions (actions, SERVER_ENTRIES, G_N_ELEMENTS (SERVER_ENTRIES), self);
-	seahorse_viewer_include_actions (SEAHORSE_VIEWER (self), actions);
+	seahorse_catalog_include_actions (SEAHORSE_CATALOG (self), actions);
 
 	self->pv->import_actions = gtk_action_group_new ("import");
 	gtk_action_group_set_translation_domain (self->pv->import_actions, GETTEXT_PACKAGE);
 	gtk_action_group_add_actions (self->pv->import_actions, IMPORT_ENTRIES, G_N_ELEMENTS (IMPORT_ENTRIES), self);
 	g_object_set (gtk_action_group_get_action (self->pv->import_actions, "key-import-keyring"), "is-important", TRUE, NULL);
-	seahorse_viewer_include_actions (SEAHORSE_VIEWER (self), self->pv->import_actions);
+	seahorse_catalog_include_actions (SEAHORSE_CATALOG (self), self->pv->import_actions);
 
 	/* init key list & selection settings */
 	self->pv->view = GTK_TREE_VIEW (seahorse_widget_get_widget (SEAHORSE_WIDGET (self), "key_list"));
@@ -332,8 +332,8 @@ seahorse_keyserver_results_constructor (GType type, guint n_props, GObjectConstr
 	gtk_widget_grab_focus (GTK_WIDGET (self->pv->view));
 
 	/* To avoid flicker */
-	seahorse_viewer_ensure_updated (SEAHORSE_VIEWER (self));
-	seahorse_widget_show (SEAHORSE_WIDGET (SEAHORSE_VIEWER (self)));
+	seahorse_catalog_ensure_updated (SEAHORSE_CATALOG (self));
+	seahorse_widget_show (SEAHORSE_WIDGET (SEAHORSE_CATALOG (self)));
 
 	self->pv->store = seahorse_key_manager_store_new (GCR_COLLECTION (self->pv->collection),
 	                                                  self->pv->view,
@@ -344,7 +344,7 @@ seahorse_keyserver_results_constructor (GType type, guint n_props, GObjectConstr
 	/* Include actions from the backend */
 	actions = NULL;
 	g_object_get (seahorse_pgp_backend_get (), "actions", &actions, NULL);
-	seahorse_viewer_include_actions (SEAHORSE_VIEWER (self), actions);
+	seahorse_catalog_include_actions (SEAHORSE_CATALOG (self), actions);
 	g_object_unref (actions);
 
 	return G_OBJECT (self);
@@ -471,8 +471,8 @@ seahorse_keyserver_results_class_init (SeahorseKeyserverResultsClass *klass)
 	gobject_class->set_property = seahorse_keyserver_results_set_property;
 	gobject_class->get_property = seahorse_keyserver_results_get_property;
 
-	SEAHORSE_VIEWER_CLASS (klass)->get_selected_objects = seahorse_keyserver_results_get_selected_objects;
-	SEAHORSE_VIEWER_CLASS (klass)->get_selected_places = seahorse_keyserver_results_get_selected_places;
+	SEAHORSE_CATALOG_CLASS (klass)->get_selected_objects = seahorse_keyserver_results_get_selected_objects;
+	SEAHORSE_CATALOG_CLASS (klass)->get_selected_places = seahorse_keyserver_results_get_selected_places;
 
 	g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_SEARCH,
 	         g_param_spec_string ("search", "search", "search", NULL,
@@ -492,7 +492,7 @@ on_search_completed (GObject *source,
 
 	seahorse_pgp_backend_search_remote_finish (NULL, result, &error);
 	if (error != NULL) {
-		window = seahorse_viewer_get_window (SEAHORSE_VIEWER (self));
+		window = seahorse_catalog_get_window (SEAHORSE_CATALOG (self));
 		seahorse_util_show_error (window, _("The search for keys failed."), error->message);
 		g_error_free (error);
 	}
diff --git a/pgp/seahorse-keyserver-results.h b/pgp/seahorse-keyserver-results.h
index e544f60..aa72dcf 100644
--- a/pgp/seahorse-keyserver-results.h
+++ b/pgp/seahorse-keyserver-results.h
@@ -27,7 +27,7 @@
 #include <glib-object.h>
 #include <gtk/gtk.h>
 
-#include "seahorse-viewer.h"
+#include "seahorse-catalog.h"
 #include "seahorse-object.h"
 
 G_BEGIN_DECLS
@@ -45,12 +45,12 @@ typedef struct _SeahorseKeyserverResultsClass SeahorseKeyserverResultsClass;
 typedef struct _SeahorseKeyserverResultsPrivate SeahorseKeyserverResultsPrivate;
 
 struct _SeahorseKeyserverResults {
-	SeahorseViewer parent_instance;
+	SeahorseCatalog parent_instance;
 	SeahorseKeyserverResultsPrivate *pv;
 };
 
 struct _SeahorseKeyserverResultsClass {
-	SeahorseViewerClass parent_class;
+	SeahorseCatalogClass parent_class;
 };
 
 GType            seahorse_keyserver_results_get_type         (void);
diff --git a/pkcs11/seahorse-interaction.h b/pkcs11/seahorse-interaction.h
index 54209ee..cd0d635 100644
--- a/pkcs11/seahorse-interaction.h
+++ b/pkcs11/seahorse-interaction.h
@@ -25,7 +25,6 @@
 #include <gtk/gtk.h>
 
 #include "seahorse-object.h"
-#include "seahorse-viewer.h"
 
 #define SEAHORSE_TYPE_INTERACTION                  (seahorse_interaction_get_type ())
 #define SEAHORSE_INTERACTION(obj)                  (G_TYPE_CHECK_INSTANCE_CAST ((obj), SEAHORSE_TYPE_INTERACTION, SeahorseInteraction))
diff --git a/src/seahorse-key-manager.c b/src/seahorse-key-manager.c
index 1b27f96..3c2fede 100644
--- a/src/seahorse-key-manager.c
+++ b/src/seahorse-key-manager.c
@@ -83,7 +83,7 @@ enum  {
 	TARGETS_URIS
 };
 
-G_DEFINE_TYPE (SeahorseKeyManager, seahorse_key_manager, SEAHORSE_TYPE_VIEWER);
+G_DEFINE_TYPE (SeahorseKeyManager, seahorse_key_manager, SEAHORSE_TYPE_CATALOG);
 
 /* -----------------------------------------------------------------------------
  * INTERNAL 
@@ -122,7 +122,7 @@ on_keymanager_row_activated (GtkTreeView* view, GtkTreePath* path,
 	
 	obj = seahorse_key_manager_store_get_object_from_path (view, path);
 	if (obj != NULL)
-		seahorse_viewer_show_properties (SEAHORSE_VIEWER (self), obj);
+		seahorse_catalog_show_properties (SEAHORSE_CATALOG (self), obj);
 }
 
 G_MODULE_EXPORT gboolean
@@ -132,8 +132,8 @@ on_keymanager_key_list_button_pressed (GtkTreeView* view, GdkEventButton* event,
 	g_return_val_if_fail (GTK_IS_TREE_VIEW (view), FALSE);
 	
 	if (event->button == 3)
-		seahorse_viewer_show_context_menu (SEAHORSE_VIEWER (self),
-		                                   SEAHORSE_VIEWER_MENU_OBJECT,
+		seahorse_catalog_show_context_menu (SEAHORSE_CATALOG (self),
+		                                   SEAHORSE_CATALOG_MENU_OBJECT,
 		                                   event->button, event->time);
 
 	return FALSE;
@@ -144,10 +144,10 @@ on_keymanager_key_list_popup_menu (GtkTreeView* view, SeahorseKeyManager* self)
 {
 	GList *objects;
 
-	objects = seahorse_viewer_get_selected_objects (SEAHORSE_VIEWER (self));
+	objects = seahorse_catalog_get_selected_objects (SEAHORSE_CATALOG (self));
 	if (objects != NULL)
-		seahorse_viewer_show_context_menu (SEAHORSE_VIEWER (self),
-		                                   SEAHORSE_VIEWER_MENU_OBJECT,
+		seahorse_catalog_show_context_menu (SEAHORSE_CATALOG (self),
+		                                   SEAHORSE_CATALOG_MENU_OBJECT,
 		                                   0, gtk_get_current_event_time ());
 	g_list_free (objects);
 	return FALSE;
@@ -158,7 +158,7 @@ on_file_new (GtkAction* action, SeahorseKeyManager* self)
 {
 	g_return_if_fail (SEAHORSE_IS_KEY_MANAGER (self));
 	g_return_if_fail (GTK_IS_ACTION (action));
-	seahorse_generate_select_show (seahorse_viewer_get_window (SEAHORSE_VIEWER (self)));
+	seahorse_generate_select_show (seahorse_catalog_get_window (SEAHORSE_CATALOG (self)));
 }
 
 G_MODULE_EXPORT void 
@@ -166,7 +166,7 @@ on_keymanager_new_button (GtkButton* button, SeahorseKeyManager* self)
 {
 	g_return_if_fail (SEAHORSE_IS_KEY_MANAGER (self));
 	g_return_if_fail (GTK_IS_BUTTON (button));
-	seahorse_generate_select_show (seahorse_viewer_get_window (SEAHORSE_VIEWER (self)));
+	seahorse_generate_select_show (seahorse_catalog_get_window (SEAHORSE_CATALOG (self)));
 }
 
 #if REFACTOR_FIRST
@@ -216,7 +216,7 @@ import_files (SeahorseKeyManager* self,
 	GtkDialog *dialog;
 	GtkWindow *parent;
 
-	parent = seahorse_viewer_get_window (SEAHORSE_VIEWER (self));
+	parent = seahorse_catalog_get_window (SEAHORSE_CATALOG (self));
 	dialog = seahorse_import_dialog_new (parent);
 	seahorse_import_dialog_add_uris (SEAHORSE_IMPORT_DIALOG (dialog), uris);
 
@@ -234,7 +234,7 @@ import_prompt (SeahorseKeyManager* self)
 	g_return_if_fail (SEAHORSE_IS_KEY_MANAGER (self));
 
 	dialog = seahorse_util_chooser_open_new (_("Import Key"), 
-	                                         seahorse_viewer_get_window (SEAHORSE_VIEWER (self)));
+	                                         seahorse_catalog_get_window (SEAHORSE_CATALOG (self)));
 	seahorse_util_chooser_show_key_files (dialog);
 	
 	uri = seahorse_util_chooser_open_prompt (dialog);
@@ -271,7 +271,7 @@ import_text (SeahorseKeyManager* self,
 	GtkDialog *dialog;
 	GtkWindow *parent;
 
-	parent = seahorse_viewer_get_window (SEAHORSE_VIEWER (self));
+	parent = seahorse_catalog_get_window (SEAHORSE_CATALOG (self));
 	dialog = seahorse_import_dialog_new (parent);
 	seahorse_import_dialog_add_text (SEAHORSE_IMPORT_DIALOG (dialog),
 	                                 display_name, text);
@@ -474,16 +474,16 @@ static const GtkRadioActionEntry VIEW_RADIO_ACTIONS[] = {
 };
 
 static GList *
-seahorse_key_manager_get_selected_objects (SeahorseViewer* viewer)
+seahorse_key_manager_get_selected_objects (SeahorseCatalog *catalog)
 {
-	SeahorseKeyManager *self = SEAHORSE_KEY_MANAGER (viewer);
+	SeahorseKeyManager *self = SEAHORSE_KEY_MANAGER (catalog);
 	return seahorse_key_manager_store_get_selected_objects (self->pv->view);
 }
 
 static GList *
-seahorse_key_manager_get_selected_places (SeahorseViewer* viewer)
+seahorse_key_manager_get_selected_places (SeahorseCatalog *catalog)
 {
-	SeahorseKeyManager *self = SEAHORSE_KEY_MANAGER (viewer);
+	SeahorseKeyManager *self = SEAHORSE_KEY_MANAGER (catalog);
 	return seahorse_sidebar_get_selected_places (self->pv->sidebar);
 }
 
@@ -525,7 +525,7 @@ on_sidebar_popup_menu (SeahorseSidebar *sidebar,
 	const gchar *name;
 
 	name = G_OBJECT_TYPE_NAME (collection);
-	seahorse_viewer_show_context_menu (SEAHORSE_VIEWER (self), name,
+	seahorse_catalog_show_context_menu (SEAHORSE_CATALOG (self), name,
 	                                   0, gtk_get_current_event_time ());
 }
 
@@ -556,7 +556,7 @@ setup_sidebar (SeahorseKeyManager *self)
 	g_settings_bind (self->pv->settings, "sidebar-visible",
 	                 action, "active",
 	                 G_SETTINGS_BIND_DEFAULT);
-	seahorse_viewer_include_actions (SEAHORSE_VIEWER (self), actions);
+	seahorse_catalog_include_actions (SEAHORSE_CATALOG (self), actions);
 	g_object_unref (actions);
 
 	g_settings_bind (self->pv->settings, "places-selected",
@@ -574,7 +574,7 @@ setup_sidebar (SeahorseKeyManager *self)
 		actions = NULL;
 		g_object_get (l->data, "actions", &actions, NULL);
 		if (actions != NULL) {
-			seahorse_viewer_include_actions (SEAHORSE_VIEWER (self), actions);
+			seahorse_catalog_include_actions (SEAHORSE_CATALOG (self), actions);
 			g_object_unref (actions);
 		}
 	}
@@ -594,7 +594,7 @@ seahorse_key_manager_constructed (GObject *object)
 
 	G_OBJECT_CLASS (seahorse_key_manager_parent_class)->constructed (object);
 
-	gtk_window_set_title (seahorse_viewer_get_window (SEAHORSE_VIEWER (self)), _("Passwords and Keys"));
+	gtk_window_set_title (seahorse_catalog_get_window (SEAHORSE_CATALOG (self)), _("Passwords and Keys"));
 
 	self->pv->collection = setup_sidebar (self);
 
@@ -617,7 +617,7 @@ seahorse_key_manager_constructed (GObject *object)
 	actions = gtk_action_group_new ("general");
 	gtk_action_group_set_translation_domain (actions, GETTEXT_PACKAGE);
 	gtk_action_group_add_actions (actions, GENERAL_ACTIONS, G_N_ELEMENTS (GENERAL_ACTIONS), self);
-	seahorse_viewer_include_actions (SEAHORSE_VIEWER (self), actions);
+	seahorse_catalog_include_actions (SEAHORSE_CATALOG (self), actions);
 
 	self->pv->view_actions = gtk_action_group_new ("view");
 	gtk_action_group_set_translation_domain (self->pv->view_actions, GETTEXT_PACKAGE);
@@ -625,7 +625,7 @@ seahorse_key_manager_constructed (GObject *object)
 	                                    G_N_ELEMENTS (VIEW_RADIO_ACTIONS), -1,
 	                                    G_CALLBACK (on_view_show_changed), self);
 	action = gtk_action_group_get_action (self->pv->view_actions, "view-personal");
-	seahorse_viewer_include_actions (SEAHORSE_VIEWER (self), self->pv->view_actions);
+	seahorse_catalog_include_actions (SEAHORSE_CATALOG (self), self->pv->view_actions);
 	self->pv->show_action = GTK_RADIO_ACTION (action);
 
 	/* Notify us when settings change */
@@ -645,7 +645,7 @@ seahorse_key_manager_constructed (GObject *object)
 	                         "clicked", G_CALLBACK (on_keymanager_new_button), self, 0);
 
 	/* Flush all updates */
-	seahorse_viewer_ensure_updated (SEAHORSE_VIEWER (self));
+	seahorse_catalog_ensure_updated (SEAHORSE_CATALOG (self));
 	
 	/* Find the toolbar */
 	widget = seahorse_widget_get_widget (SEAHORSE_WIDGET (self), "toolbar-placeholder");
@@ -717,17 +717,17 @@ seahorse_key_manager_constructed (GObject *object)
 	g_signal_emit_by_name (self, "selection-changed");
 
 	/* To avoid flicker */
-	seahorse_widget_show (SEAHORSE_WIDGET (SEAHORSE_VIEWER (self)));
+	seahorse_widget_show (SEAHORSE_WIDGET (SEAHORSE_CATALOG (self)));
 	
 	/* Setup drops */
-	gtk_drag_dest_set (GTK_WIDGET (seahorse_viewer_get_window (SEAHORSE_VIEWER (self))), 
+	gtk_drag_dest_set (GTK_WIDGET (seahorse_catalog_get_window (SEAHORSE_CATALOG (self))),
 	                   GTK_DEST_DEFAULT_ALL, NULL, 0, GDK_ACTION_COPY);
 	targets = gtk_target_list_new (NULL, 0);
 	gtk_target_list_add_uri_targets (targets, TARGETS_URIS);
 	gtk_target_list_add_text_targets (targets, TARGETS_PLAIN);
-	gtk_drag_dest_set_target_list (GTK_WIDGET (seahorse_viewer_get_window (SEAHORSE_VIEWER (self))), targets);
+	gtk_drag_dest_set_target_list (GTK_WIDGET (seahorse_catalog_get_window (SEAHORSE_CATALOG (self))), targets);
 
-	g_signal_connect_object (seahorse_viewer_get_window (SEAHORSE_VIEWER (self)), "drag-data-received", 
+	g_signal_connect_object (seahorse_catalog_get_window (SEAHORSE_CATALOG (self)), "drag-data-received",
 	                         G_CALLBACK (on_target_drag_data_received), self, 0);
 
 #ifdef REFACTOR_FIRST
@@ -774,8 +774,8 @@ seahorse_key_manager_class_init (SeahorseKeyManagerClass *klass)
 	gobject_class->constructed = seahorse_key_manager_constructed;
 	gobject_class->finalize = seahorse_key_manager_finalize;
 
-	SEAHORSE_VIEWER_CLASS (klass)->get_selected_objects = seahorse_key_manager_get_selected_objects;
-	SEAHORSE_VIEWER_CLASS (klass)->get_selected_places = seahorse_key_manager_get_selected_places;
+	SEAHORSE_CATALOG_CLASS (klass)->get_selected_objects = seahorse_key_manager_get_selected_objects;
+	SEAHORSE_CATALOG_CLASS (klass)->get_selected_places = seahorse_key_manager_get_selected_places;
 }
 
 SeahorseWidget *
diff --git a/src/seahorse-key-manager.h b/src/seahorse-key-manager.h
index 500a99c..fb5d3c3 100644
--- a/src/seahorse-key-manager.h
+++ b/src/seahorse-key-manager.h
@@ -28,7 +28,7 @@
 
 #include <gcr/gcr.h>
 
-#include "seahorse-viewer.h"
+#include "seahorse-catalog.h"
 
 G_BEGIN_DECLS
 
@@ -44,12 +44,12 @@ typedef struct _SeahorseKeyManagerClass SeahorseKeyManagerClass;
 typedef struct _SeahorseKeyManagerPrivate SeahorseKeyManagerPrivate;
 
 struct _SeahorseKeyManager {
-	SeahorseViewer parent_instance;
+	SeahorseCatalog parent_instance;
 	SeahorseKeyManagerPrivate *pv;
 };
 
 struct _SeahorseKeyManagerClass {
-	SeahorseViewerClass parent_class;
+	SeahorseCatalogClass parent_class;
 };
 
 GType            seahorse_key_manager_get_type     (void) G_GNUC_CONST;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]