Index: includes/node_gallery_handler_relationship_gallery_cover.inc
===================================================================
--- includes/node_gallery_handler_relationship_gallery_cover.inc	(revision 0)
+++ includes/node_gallery_handler_relationship_gallery_cover.inc	(revision 0)
@@ -0,0 +1,34 @@
+<?php
+// $Id$
+/**
+ * @file
+ * Node Gallery cover image relationship handler.
+ */
+
+/**
+ * Definition items:
+ * - base: The new base table this relationship will be adding. This does not
+ *   have to be a declared base table, but if there are no tables that
+ *   utilize this base table, it won't be very effective.
+ * - base field: The field to use in the relationship; if left out this will be
+ *   assumed to be the primary field.
+ * - relationship table: The actual table this relationship operates against.
+ *   This is analogous to using a 'table' override.
+ * - relationship field: The actual field this relationship operates against.
+ *   This is analogous to using a 'real field' override.
+ * - label: The default label to provide for this relationship, which is
+ *   shown in parentheses next to any field/sort/filter/argument that uses
+ *   the relationship.
+ */
+class node_gallery_handler_relationship_gallery_cover extends views_handler_relationship {
+  /**
+   * Called to implement a relationship in a query.
+   */
+  function query() {
+    parent::query();
+    
+    // Add a WHERE clause so the relationship brings just a single node for the 
+    // cover image rather than multiple rows.
+    $this->query->add_where(0, "$this->table_alias.is_cover = 1");
+  }
+}
Index: node_gallery.views.inc
===================================================================
--- node_gallery.views.inc	(revision 12)
+++ node_gallery.views.inc	(working copy)
@@ -8,6 +8,8 @@
  */
 
 function node_gallery_views_data() {
+  // ----------------------------------------------------------------------
+  // node galleries table, joined as image nodes
   $data['node_galleries']['table']['group'] = t("Node Gallery Image");
   $data['node_galleries']['table']['join'] = array(
     'node' => array(
@@ -64,7 +66,7 @@
   );
   $data['node_galleries']['is_cover'] = array(
     'title' => t('Cover Image'),
-    'help' => t('The gallery cover image.'),
+    'help' => t('Whether the gallery image is a cover image.'),
     'field' => array(
       'handler' => 'views_handler_field',
     ),
@@ -73,6 +75,8 @@
     ),
   );
   
+  // ----------------------------------------------------------------------
+  // node galleries table, joined as gallery nodes
   $data['node_galleries_gallery']['table']['group'] = t('Node Gallery');
   $data['node_galleries_gallery']['table']['join'] = array(
     'node' => array(
@@ -108,6 +112,17 @@
       'notafield' => TRUE,
     ),
   );
+  $data['node_galleries_gallery']['nid_cover'] = array(
+    'title' => t('Cover Image'),
+    'help' => t('The gallery cover image.'),
+    'relationship' => array(
+      'relationship field' => 'nid',
+      'handler' => 'node_gallery_handler_relationship_gallery_cover',
+      'base' => 'node',
+      'base field' => 'nid',
+      'label' => t('Gallery cover'),
+    ),
+  );
   $data['node_galleries_gallery']['gallery_op'] = array(
     'real field' => 'gid',
     'title' => t('Gallery Operations'),
@@ -138,6 +153,9 @@
       'node_gallery_views_handler_gallery_op' => array(
         'parent' => 'views_handler_field',
       ),
+      'node_gallery_handler_relationship_gallery_cover' => array(
+        'parent' => 'views_handler_relationship',
+      ),
     ),
   );
 }
\ No newline at end of file
