Index: app/actions/palette-editor-actions.c
===================================================================
RCS file: /cvs/gnome/gimp/app/actions/palette-editor-actions.c,v
retrieving revision 1.7
diff -u -p -r1.7 palette-editor-actions.c
--- app/actions/palette-editor-actions.c	23 May 2004 10:04:40 -0000	1.7
+++ app/actions/palette-editor-actions.c	21 Aug 2004 14:27:27 -0000
@@ -76,7 +76,28 @@ static GimpActionEntry palette_editor_ac
   { "palette-editor-zoom-all", GTK_STOCK_ZOOM_FIT,
     N_("Zoom _All"), "", NULL,
     G_CALLBACK (palette_editor_zoom_all_cmd_callback),
-    GIMP_HELP_PALETTE_EDITOR_ZOOM_ALL }
+    GIMP_HELP_PALETTE_EDITOR_ZOOM_ALL },
+
+  { "palette-editor-next-fgcolor", GTK_STOCK_ZOOM_FIT,
+    N_("Next Foreground Color"), "", NULL,
+    G_CALLBACK (palette_editor_next_fgcolor_cmd_callback),
+    GIMP_HELP_PALETTE_EDITOR_ZOOM_ALL }, 
+
+  { "palette-editor-prev-fgcolor", GTK_STOCK_ZOOM_FIT,
+    N_("Previous Foreground Color"), "", NULL,
+    G_CALLBACK (palette_editor_prev_fgcolor_cmd_callback),
+    GIMP_HELP_PALETTE_EDITOR_ZOOM_ALL }, 
+
+  { "palette-editor-next-bgcolor", GTK_STOCK_ZOOM_FIT,
+    N_("Next Background Color"), "", NULL,
+    G_CALLBACK (palette_editor_next_bgcolor_cmd_callback),
+    GIMP_HELP_PALETTE_EDITOR_ZOOM_ALL }, 
+
+  { "palette-editor-prev-bgcolor", GTK_STOCK_ZOOM_FIT,
+    N_("Previous Background Color"), "", NULL,
+    G_CALLBACK (palette_editor_prev_bgcolor_cmd_callback),
+    GIMP_HELP_PALETTE_EDITOR_ZOOM_ALL }, 
+
 };
 
 
Index: app/actions/palette-editor-commands.c
===================================================================
RCS file: /cvs/gnome/gimp/app/actions/palette-editor-commands.c,v
retrieving revision 1.12
diff -u -p -r1.12 palette-editor-commands.c
--- app/actions/palette-editor-commands.c	29 Apr 2004 12:51:57 -0000	1.12
+++ app/actions/palette-editor-commands.c	21 Aug 2004 14:27:28 -0000
@@ -28,6 +28,10 @@
 
 #include "palette-editor-commands.h"
 
+#include "core/gimp.h"
+#include "core/gimpcontext.h"
+#include "core/gimppalette.h"
+#include "core/gimpdatafactory.h"
 
 /*  public functions  */
 
@@ -101,3 +105,58 @@ palette_editor_zoom_all_cmd_callback (Gt
   if (GTK_WIDGET_SENSITIVE (editor->zoom_all_button))
     gtk_button_clicked (GTK_BUTTON (editor->zoom_all_button));
 }
+
+void
+palette_editor_next_fgcolor_cmd_callback (GtkAction *action,
+                                         gpointer   data)
+{
+  GimpPaletteEditor *editor = GIMP_PALETTE_EDITOR (data);
+
+  gimp_palette_editor_set_fg_index( editor, 
+                                    gimp_palette_editor_get_fg_index(editor) + 1);
+}
+
+void
+palette_editor_prev_fgcolor_cmd_callback (GtkAction *action,
+                                         gpointer   data)
+{
+  GimpPaletteEditor *editor = GIMP_PALETTE_EDITOR (data);
+  gimp_palette_editor_set_fg_index( editor, 
+                                    gimp_palette_editor_get_fg_index(editor) - 1);
+
+}
+
+void
+palette_editor_next_bgcolor_cmd_callback (GtkAction *action,
+                                         gpointer   data)
+{
+  GimpPaletteEditor *editor = GIMP_PALETTE_EDITOR (data);
+
+  gimp_palette_editor_set_bg_index( editor, 
+                                    gimp_palette_editor_get_bg_index(editor) + 1);
+}
+
+void
+palette_editor_prev_bgcolor_cmd_callback (GtkAction *action,
+                                         gpointer   data)
+{
+  GimpPaletteEditor *editor = GIMP_PALETTE_EDITOR (data);
+  gimp_palette_editor_set_bg_index( editor, 
+                                    gimp_palette_editor_get_bg_index(editor) - 1);
+
+}
+
+
+void
+palette_editor_palettize_foreground_cmd_callback (GtkAction *action,
+                                         gpointer   data)
+{
+
+}
+
+void
+palette_editor_palettize_background_cmd_callback (GtkAction *action,
+                                         gpointer   data)
+{
+
+}
Index: app/actions/palette-editor-commands.h
===================================================================
RCS file: /cvs/gnome/gimp/app/actions/palette-editor-commands.h,v
retrieving revision 1.6
diff -u -p -r1.6 palette-editor-commands.h
--- app/actions/palette-editor-commands.h	29 Apr 2004 12:51:57 -0000	1.6
+++ app/actions/palette-editor-commands.h	21 Aug 2004 14:27:28 -0000
@@ -36,5 +36,13 @@ void   palette_editor_zoom_out_cmd_callb
 void   palette_editor_zoom_all_cmd_callback     (GtkAction *action,
                                                  gpointer   data);
 
+void   palette_editor_next_fgcolor_cmd_callback (GtkAction *action,
+                                                 gpointer   data);
+void   palette_editor_prev_fgcolor_cmd_callback (GtkAction *action,
+                                                 gpointer   data);
 
+void   palette_editor_next_bgcolor_cmd_callback (GtkAction *action,
+                                                 gpointer   data);
+void   palette_editor_prev_bgcolor_cmd_callback (GtkAction *action,
+                                                 gpointer   data);
 #endif /* __PALETTE_EDITOR_COMMANDS_H__ */
Index: app/actions/palettes-commands.c
===================================================================
RCS file: /cvs/gnome/gimp/app/actions/palettes-commands.c,v
retrieving revision 1.25
diff -u -p -r1.25 palettes-commands.c
--- app/actions/palettes-commands.c	10 May 2004 23:22:39 -0000	1.25
+++ app/actions/palettes-commands.c	21 Aug 2004 14:27:29 -0000
@@ -135,6 +136,7 @@ palettes_merge_palettes_callback (GtkWid
 	      entry = (GimpPaletteEntry *) cols->data;
 
 	      gimp_palette_add_entry (new_palette,
+	    			      -1,
 				      entry->name,
 				      &entry->color);
 	    }
Index: app/core/gimppalette-import.c
===================================================================
RCS file: /cvs/gnome/gimp/app/core/gimppalette-import.c,v
retrieving revision 1.18
diff -u -p -r1.18 gimppalette-import.c
--- app/core/gimppalette-import.c	13 Jul 2004 16:36:29 -0000	1.18
+++ app/core/gimppalette-import.c	21 Aug 2004 14:28:36 -0000
@@ -77,7 +77,7 @@ gimp_palette_import_from_gradient (GimpG
   for (loop = 0, cur_x = 0; loop < n_colors; loop++, cur_x += dx)
     {
       gimp_gradient_get_color_at (gradient, cur_x, reverse, &color);
-      gimp_palette_add_entry (palette, NULL, &color);
+      gimp_palette_add_entry (palette, -1, NULL, &color);
     }
 
   return palette;
@@ -225,7 +225,7 @@ gimp_palette_import_create_image_palette
      (guchar) color_tab->b + (color_tab->b_adj / color_tab->count),
      255);
 
-  gimp_palette_add_entry (palette, lab, &color);
+  gimp_palette_add_entry (palette, -1, lab, &color);
 
   g_free (lab);
 }
@@ -363,7 +363,7 @@ gimp_palette_import_from_indexed_image (
 			   gimage->cmap[count * 3 + 2],
 			   255);
 
-      gimp_palette_add_entry (palette, NULL, &color);
+      gimp_palette_add_entry (palette, -1, NULL, &color);
     }
 
   return palette;
@@ -419,7 +419,7 @@ gimp_palette_import_from_file (const gch
                            color_bytes[1],
                            color_bytes[2],
                            255);
-      gimp_palette_add_entry (palette, NULL, &color);
+      gimp_palette_add_entry (palette, -1, NULL, &color);
     }
 
   close (fd);
Index: app/core/gimppalette.c
===================================================================
RCS file: /cvs/gnome/gimp/app/core/gimppalette.c,v
retrieving revision 1.49
diff -u -p -r1.49 gimppalette.c
--- app/core/gimppalette.c	26 Jul 2004 19:00:22 -0000	1.49
+++ app/core/gimppalette.c	21 Aug 2004 14:28:39 -0000
@@ -615,7 +615,7 @@ gimp_palette_duplicate (GimpData *data,
     {
       GimpPaletteEntry *entry = list->data;
 
-      gimp_palette_add_entry (new, entry->name, &entry->color);
+      gimp_palette_add_entry (new, -1, entry->name, &entry->color);
     }
 
   return GIMP_DATA (new);
@@ -623,24 +623,36 @@ gimp_palette_duplicate (GimpData *data,
 
 GimpPaletteEntry *
 gimp_palette_add_entry (GimpPalette   *palette,
+                        gint           position,
                         const gchar   *name,
                         const GimpRGB *color)
 {
   GimpPaletteEntry *entry;
+  GList            *list;
 
   g_return_val_if_fail (GIMP_IS_PALETTE (palette), NULL);
   g_return_val_if_fail (color != NULL, NULL);
 
+  if (position < 0)
+	position = g_list_length(palette->colors) - 1;
+
   entry = g_new0 (GimpPaletteEntry, 1);
 
   entry->color    = *color;
 
   entry->name     = g_strdup (name ? name : _("Untitled"));
-  entry->position = palette->n_colors;
+  entry->position = position;
 
-  palette->colors    = g_list_append (palette->colors, entry);
+  palette->colors    = g_list_insert (palette->colors, entry, position);
   palette->n_colors += 1;
 
+  list = g_list_nth(palette->colors, position);
+  while(list)
+  {
+    ((GimpPaletteEntry *)(list->data))->position++;
+    list = list->next;
+  }
+
   /*  will make the palette dirty too  */
   gimp_object_name_changed (GIMP_OBJECT (palette));
 
@@ -682,6 +694,7 @@ gimp_palette_delete_entry (GimpPalette  
           gimp_rgba_set (&color, 0.0, 0.0, 0.0, GIMP_OPACITY_OPAQUE);
 
           gimp_palette_add_entry (palette,
+                                  -1,
                                   _("Black"),
                                   &color);
         }
@@ -715,6 +728,41 @@ gimp_palette_get_n_columns  (GimpPalette
   return palette->n_columns;
 }
 
+gint gimp_palette_validate_index(GimpPalette *palette,
+                                 gint         index)
+{
+  GList      *list;  
+
+  g_return_val_if_fail(palette != NULL,-1);
+
+  list = palette->colors;
+  return CLAMP(index, 0, g_list_length(list) - 1);
+
+}
+
+gint gimp_palette_find_color_index(GimpPalette   *palette,
+                                   const GimpRGB *color)
+{
+  GList      *list;
+  GimpRGB    *rgb;
+  gint        i;  
+
+  g_return_val_if_fail(palette != NULL,-1);
+  list = palette->colors;
+  i = 0;
+
+  while (list)
+  {
+    rgb = &(((GimpPaletteEntry *)(list->data))->color);
+    if (color->r == rgb->r && color->g == rgb->g && color->b == rgb->b)
+	return i;
+	
+    list = list->next;
+    i++;
+  }
+  
+  return 0;
+}
 
 /*  private functions  */
 
Index: app/core/gimppalette.h
===================================================================
RCS file: /cvs/gnome/gimp/app/core/gimppalette.h,v
retrieving revision 1.19
diff -u -p -r1.19 gimppalette.h
--- app/core/gimppalette.h	26 Jul 2004 19:00:22 -0000	1.19
+++ app/core/gimppalette.h	21 Aug 2004 14:28:40 -0000
@@ -72,6 +72,7 @@ GList            * gimp_palette_load    
                                                 GError          **error);
 
 GimpPaletteEntry * gimp_palette_add_entry      (GimpPalette      *palette,
+                                                gint              position,
 					        const gchar      *name,
 					        const GimpRGB    *color);
 void               gimp_palette_delete_entry   (GimpPalette      *palette,
@@ -81,5 +82,10 @@ void               gimp_palette_set_n_co
                                                 gint              n_columns);
 gint               gimp_palette_get_n_columns  (GimpPalette      *palette);
 
+gint               gimp_palette_validate_index (GimpPalette      *palette,
+                                                gint              index);
+gint               gimp_palette_find_color_index(GimpPalette     *palette,
+                                                 const GimpRGB   *color);
+
 
 #endif /* __GIMP_PALETTE_H__ */
Index: app/widgets/gimppaletteeditor.c
===================================================================
RCS file: /cvs/gnome/gimp/app/widgets/gimppaletteeditor.c,v
retrieving revision 1.165
diff -u -p -r1.165 gimppaletteeditor.c
--- app/widgets/gimppaletteeditor.c	30 Jun 2004 12:10:08 -0000	1.165
+++ app/widgets/gimppaletteeditor.c	21 Aug 2004 14:29:18 -0000
@@ -104,6 +104,10 @@ static void   palette_editor_color_name_
 static void   palette_editor_columns_changed       (GtkAdjustment     *adj,
                                                     GimpPaletteEditor *editor);
 
+static void   palette_editor_adjust_indices        (GimpPaletteEditor *editor,
+                                                    gint               position,
+                                                    gboolean           deleted);
+
 static void   palette_editor_new_clicked           (GtkWidget         *widget,
                                                     GimpPaletteEditor *editor);
 static void   palette_editor_new_ext_clicked       (GtkWidget         *widget,
@@ -523,9 +527,13 @@ gimp_palette_editor_pick_color (GimpPale
                                 const GimpRGB      *color,
                                 GimpColorPickState  pick_state)
 {
+  gint        position;
   g_return_if_fail (GIMP_IS_PALETTE_EDITOR (editor));
   g_return_if_fail (color != NULL);
 
+  position = g_list_index(GIMP_PALETTE (GIMP_DATA_EDITOR(editor)->data)->colors, editor->color);
+  position++;
+
   if (GIMP_DATA_EDITOR (editor)->data_editable)
     {
       GimpData *data = gimp_data_editor_get_data (GIMP_DATA_EDITOR (editor));
@@ -533,7 +541,7 @@ gimp_palette_editor_pick_color (GimpPale
       switch (pick_state)
         {
         case GIMP_COLOR_PICK_STATE_NEW:
-          editor->color = gimp_palette_add_entry (GIMP_PALETTE (data),
+          editor->color = gimp_palette_add_entry (GIMP_PALETTE (data), position,
                                                   NULL, color);
           break;
 
@@ -610,11 +618,19 @@ palette_editor_color_area_button_press (
       if (list)
         {
           if (bevent->state & GDK_CONTROL_MASK)
-            gimp_context_set_background (user_context,
-                                         &editor->color->color);
+	     {
+              gimp_context_set_background (user_context,
+                                           &editor->color->color);
+              editor->last_bg_index = g_list_index(palette->colors,editor->color);
+	       g_warning("bg_index:%d",editor->last_bg_index);
+            }
           else
-            gimp_context_set_foreground (user_context,
-                                         &editor->color->color);
+            {
+              gimp_context_set_foreground (user_context,
+                                           &editor->color->color);
+              editor->last_fg_index = g_list_index(palette->colors,editor->color);
+	       g_warning("fg_index:%d",editor->last_fg_index);
+            }
 
           palette_editor_draw_entries (editor, row, col);
         }
@@ -1033,11 +1049,38 @@ palette_editor_edit_clicked (GtkWidget  
 {
   GimpDataEditor *data_editor = GIMP_DATA_EDITOR (editor);
   GimpPalette    *palette;
+  GimpContext    *user_context;
+  gboolean        reset_fg,
+                  reset_bg;
+  GimpRGB         oc;
+  GimpRGB         ec;
 
   if (! (data_editor->data && data_editor->data_editable && editor->color))
     return;
 
   palette = GIMP_PALETTE (data_editor->data);
+  user_context = gimp_get_user_context (data_editor->data_factory->gimp);
+
+  /* Will need to update fg and/or bg afterwards if they match the old color
+     in both RGB values and index */
+
+  reset_fg = FALSE;
+  reset_bg = FALSE;
+  ec = editor->color->color;
+  
+  gimp_context_get_foreground(user_context, &oc);
+
+  if (oc.r == ec.r && oc.g == ec.g && oc.b == ec.b &&
+      g_list_index (palette->colors, editor->color) == editor->last_fg_index)
+    reset_fg = TRUE;
+
+  gimp_context_get_background(user_context, &oc);
+
+  if (oc.r == ec.r && oc.g == ec.g && oc.b == ec.b &&
+      g_list_index (palette->colors, editor->color) == editor->last_fg_index)
+    reset_bg = TRUE;
+
+  editor->old_edited_color = ec;
 
   if (! editor->color_notebook)
     {
@@ -1066,6 +1109,50 @@ palette_editor_edit_clicked (GtkWidget  
                                 &editor->color->color);
       color_notebook_show (editor->color_notebook);
     }
+
+  if (reset_fg)
+    gimp_context_set_foreground (user_context, &(editor->color->color) );
+
+  if (reset_bg)
+    gimp_context_set_background (user_context, &(editor->color->color) );
+
+}
+
+static void
+palette_editor_adjust_indices (GimpPaletteEditor *editor,
+                               gint               position,
+                               gboolean           deleted)
+{ 
+  if (deleted)
+    {
+      GimpContext     *user_context;
+      GimpPalette     *palette = GIMP_PALETTE (GIMP_DATA_EDITOR(editor)->data);
+
+      user_context = gimp_get_user_context (
+                        GIMP_DATA_EDITOR(editor)->data_factory->gimp);
+
+      if (editor->last_fg_index > position)
+        editor->last_fg_index--;
+
+      if (editor->last_bg_index > position)
+        editor->last_bg_index--;
+
+      /* if the fg/bg_index color was deleted, reset fg/bg color */
+      if (editor->last_fg_index == position)
+        {
+          gimp_context_set_foreground(user_context, 
+                                      &((GimpPaletteEntry *)g_list_nth_data(palette->colors, position))->color);
+	}
+    }
+  else
+    {
+      if (position <= editor->last_fg_index)
+        editor->last_fg_index++;
+
+      if (position <= editor->last_bg_index)
+        editor->last_bg_index++;
+
+    }
 }
 
 static void
@@ -1087,15 +1174,22 @@ palette_editor_new_ext_clicked (GtkWidge
       GimpPalette *palette = GIMP_PALETTE (data_editor->data);
       GimpContext *user_context;
       GimpRGB      color;
+      gint         position;
 
       user_context = gimp_get_user_context (data_editor->data_factory->gimp);
 
+      position = g_list_index(palette->colors, (gconstpointer) (editor->color));
+      position++;
+
       if (state & GDK_CONTROL_MASK)
         gimp_context_get_background (user_context, &color);
       else
         gimp_context_get_foreground (user_context, &color);
 
-      editor->color = gimp_palette_add_entry (palette, NULL, &color);
+      editor->color = gimp_palette_add_entry (palette, position, NULL, &color);
+
+      palette_editor_adjust_indices(editor, position - 1, FALSE);
+
     }
 }
 
@@ -1108,8 +1202,13 @@ palette_editor_delete_clicked (GtkWidget
   if (data_editor->data && data_editor->data_editable && editor->color)
     {
       GimpPalette *palette = GIMP_PALETTE (data_editor->data);
+      gint         position;
+
+      position = g_list_index(palette->colors, (gconstpointer) (editor->color));
 
       gimp_palette_delete_entry (palette, editor->color);
+
+      palette_editor_adjust_indices(editor, position, TRUE);
     }
 }
 
@@ -1206,11 +1305,17 @@ palette_editor_drop_color (GtkWidget    
 			   gpointer       data)
 {
   GimpPaletteEditor *editor = GIMP_PALETTE_EDITOR (data);
+  gint               position;
+
+  position = g_list_index(GIMP_PALETTE (GIMP_DATA_EDITOR (editor)->data)->colors, (gconstpointer) (editor->color));
+  position++;
 
   if (GIMP_DATA_EDITOR (editor)->data_editable)
     {
+      
       editor->color =
 	gimp_palette_add_entry (GIMP_PALETTE (GIMP_DATA_EDITOR (editor)->data),
+				position,
                                 NULL,
 				(GimpRGB *) color);
     }
@@ -1272,15 +1377,17 @@ palette_editor_color_notebook_callback (
 {
   GimpPaletteEditor *editor = GIMP_PALETTE_EDITOR (data);
   GimpPalette       *palette;
-  GimpContext       *user_context;
 
   palette = GIMP_PALETTE (GIMP_DATA_EDITOR (editor)->data);
 
-  user_context = gimp_get_user_context (GIMP_DATA_EDITOR (editor)->data_factory->gimp);
-
   switch (state)
     {
     case COLOR_NOTEBOOK_UPDATE:
+      if (editor->color)
+	{
+	  editor->color->color = *color;
+          palette_editor_invalidate_preview(palette, editor);
+        }
       break;
 
     case COLOR_NOTEBOOK_OK:
@@ -1292,6 +1399,62 @@ palette_editor_color_notebook_callback (
 
       /* Fallthrough */
     case COLOR_NOTEBOOK_CANCEL:
+      if (editor->color)
+          editor->color->color = editor->old_edited_color;
       color_notebook_hide (editor->color_notebook);
     }
 }
+
+gint
+gimp_palette_editor_get_fg_index (GimpPaletteEditor * editor)
+{
+  return editor->last_fg_index;
+}
+
+void
+gimp_palette_editor_set_fg_index (GimpPaletteEditor * editor, gint index)
+{
+  GimpContext    *user_context;
+  GimpPalette    *palette;
+
+
+  g_warning("Entering gimp_palette_editor_set_fg_index");
+
+  palette = GIMP_PALETTE (GIMP_DATA_EDITOR (editor)->data);
+  index = CLAMP (index, 0, g_list_length (palette->colors));
+  user_context =
+    gimp_get_user_context (GIMP_DATA_EDITOR (editor)->data_factory->gimp);
+
+  editor->last_fg_index = index;
+  editor->color = g_list_nth_data (palette->colors, index);
+  gimp_context_set_foreground (user_context, &(editor->color->color));
+
+  palette_editor_invalidate_preview (palette, editor);
+
+}
+
+gint
+gimp_palette_editor_get_bg_index (GimpPaletteEditor * editor)
+{
+  return editor->last_bg_index;
+}
+void
+gimp_palette_editor_set_bg_index (GimpPaletteEditor * editor, gint index)
+{
+  GimpContext    *user_context;
+  GimpPalette    *palette;
+
+  g_warning("Entering gimp_palette_editor_set_bg_index");
+
+  palette = GIMP_PALETTE (GIMP_DATA_EDITOR (editor)->data);
+  index = CLAMP (index, 0, g_list_length (palette->colors));
+  user_context =
+    gimp_get_user_context (GIMP_DATA_EDITOR (editor)->data_factory->gimp);
+
+  editor->last_bg_index = index;
+  editor->color = g_list_nth_data (palette->colors, index);
+  gimp_context_set_background (user_context, &(editor->color->color));
+
+  palette_editor_invalidate_preview (palette, editor);
+
+}
Index: app/widgets/gimppaletteeditor.h
===================================================================
RCS file: /cvs/gnome/gimp/app/widgets/gimppaletteeditor.h,v
retrieving revision 1.30
diff -u -p -r1.30 gimppaletteeditor.h
--- app/widgets/gimppaletteeditor.h	30 Jun 2004 12:10:08 -0000	1.30
+++ app/widgets/gimppaletteeditor.h	21 Aug 2004 14:29:19 -0000
@@ -57,9 +57,12 @@ struct _GimpPaletteEditor
   GimpPaletteEntry *color;
   GimpPaletteEntry *dnd_color;
 
+  GimpRGB           old_edited_color;
   gfloat            zoom_factor;  /* range from 0.1 to 4.0 */
   gint              col_width;
   gint              last_width;
+  gint              last_fg_index;
+  gint              last_bg_index;
   gint              columns;
   gboolean          columns_valid;
 };
@@ -79,5 +82,12 @@ void             gimp_palette_editor_pic
                                                  const GimpRGB      *color,
                                                  GimpColorPickState  pick_state);
 
+gint		 gimp_palette_editor_get_fg_index(GimpPaletteEditor  *editor);
+void		 gimp_palette_editor_set_fg_index(GimpPaletteEditor  *editor,
+                                                  gint                index);
+
+gint		 gimp_palette_editor_get_bg_index(GimpPaletteEditor  *editor);
+void		 gimp_palette_editor_set_bg_index(GimpPaletteEditor  *editor,
+                                                  gint                index);
 
 #endif /* __GIMP_PALETTE_EDITOR_H__ */
Index: menus/palette-editor-menu.xml
===================================================================
RCS file: /cvs/gnome/gimp/menus/palette-editor-menu.xml,v
retrieving revision 1.3
diff -u -p -r1.3 palette-editor-menu.xml
--- menus/palette-editor-menu.xml	21 Apr 2004 16:10:00 -0000	1.3
+++ menus/palette-editor-menu.xml	21 Aug 2004 14:29:36 -0000
@@ -11,5 +11,7 @@
     <menuitem action="palette-editor-zoom-out" />
     <menuitem action="palette-editor-zoom-in" />
     <menuitem action="palette-editor-zoom-all" />
+    <menuitem action="palette-editor-next-fgcolor" />
+    <menuitem action="palette-editor-prev-fgcolor" />
+    <menuitem action="palette-editor-next-bgcolor" />
+    <menuitem action="palette-editor-prev-bgcolor" />
   </popup>
 </ui>