--- guigedit.c.orig	2009-02-14 10:50:23.000000000 -0500
+++ guigedit.c	2009-02-14 13:51:20.000000000 -0500
@@ -259,6 +259,10 @@
     GtkWidget *update_prev;
     GtkWidget *update_next;
 
+    GtkWidget *button_update;
+    GtkWidget *button_prev;
+    GtkWidget *button_next;
+
     GtkWidget *edit_menu;
     GtkWidget *reload;
     GtkWidget *resize;
@@ -406,6 +410,12 @@
     gtk_widget_set_sensitive(ge->update, FALSE);
     gtk_widget_set_sensitive(ge->update_next, FALSE);
     gtk_widget_set_sensitive(ge->update_prev, FALSE);
+    gtk_widget_set_sensitive(ge->button_update, FALSE);
+
+    /*
+     * Force the focus to be on the glyph grid
+     */
+    gtk_widget_grab_focus(ge->gedit);
 }
 
 /*
@@ -414,6 +424,9 @@
 static void
 update_glyphedit(gbdfed_editor_t *ed, GlypheditRec *ge, bdf_glyph_grid_t *grid)
 {
+    Glyphedit *gw;
+
+    gw = GLYPHEDIT(ge->gedit);
     gtk_entry_set_text(GTK_ENTRY(ge->name), grid->name);
 
     if (grid->unencoded)
@@ -448,7 +461,7 @@
     /*
      * Set the new grid in the glyph editor.
      */
-    glyphedit_set_grid(GLYPHEDIT(ge->gedit), grid);
+    glyphedit_set_grid(gw, grid);
 
     /*
      * Set the sensitivity of the update menu items appropriately.
@@ -457,11 +470,28 @@
         gtk_widget_set_sensitive(ge->update, TRUE);
         gtk_widget_set_sensitive(ge->update_next, TRUE);
         gtk_widget_set_sensitive(ge->update_prev, TRUE);
+	gtk_widget_set_sensitive(ge->button_update, TRUE);
     } else {
         gtk_widget_set_sensitive(ge->update, FALSE);
         gtk_widget_set_sensitive(ge->update_next, FALSE);
         gtk_widget_set_sensitive(ge->update_prev, FALSE);
+	gtk_widget_set_sensitive(ge->button_update, FALSE);
     }
+
+    if (glyphedit_get_encoding(gw) == 0)
+      gtk_widget_set_sensitive(ge->button_prev, FALSE);
+    else
+      gtk_widget_set_sensitive(ge->button_prev, TRUE);
+
+    if (glyphedit_get_encoding(gw) == 0xffff)
+      gtk_widget_set_sensitive(ge->button_next, FALSE);
+    else
+      gtk_widget_set_sensitive(ge->button_next, TRUE);
+
+    /*
+     * Force the focus to be on the glyph grid.
+     */
+    gtk_widget_grab_focus(ge->gedit);
 }
 
 static void
@@ -676,9 +706,6 @@
 edit_menu_down(GtkWidget *w, GdkEvent *event, gpointer data)
 {
     GlypheditRec *ge = glyph_editors + GPOINTER_TO_UINT(data);
-    Glyphedit *gw;
-
-    gw = GLYPHEDIT(ge->gedit);
 
     gtk_widget_set_sensitive(ge->paste, TRUE);
     gtk_widget_set_sensitive(ge->copy, TRUE);
@@ -1733,6 +1760,9 @@
     gtk_widget_set_sensitive(ge->update, TRUE);
     gtk_widget_set_sensitive(ge->update_next, TRUE);
     gtk_widget_set_sensitive(ge->update_prev, TRUE);
+    gtk_widget_set_sensitive(ge->button_update, TRUE);
+    gtk_widget_set_sensitive(ge->button_next, TRUE);
+    gtk_widget_set_sensitive(ge->button_prev, TRUE);
 }
 
 /*
@@ -1823,13 +1853,14 @@
     gtk_widget_set_sensitive(ge->update, TRUE);
     gtk_widget_set_sensitive(ge->update_next, TRUE);
     gtk_widget_set_sensitive(ge->update_prev, TRUE);
+    gtk_widget_set_sensitive(ge->button_update, TRUE);
 }
 
 static void
 _guigedit_build_editor(GlypheditRec *ge, bdf_glyph_grid_t *grid, guint base,
                        gbdfed_editor_t *ed)
 {
-    GtkWidget *mb, *mitem, *frame, *vbox, *vbox1, *hbox;
+    GtkWidget *mb, *mitem, *frame, *vbox, *vbox1, *hbox, *img;
     bdf_bitmap_t image;
 
     if (ed->file == 0)
@@ -1874,7 +1905,7 @@
     gtk_window_add_accel_group(GTK_WINDOW(ge->shell), ge->ag);
 
     /*
-     * 1. Add the glyph name and encoding widgets.
+     * 1. Add the glyph name, next/previous buttons and encoding widgets.
      */
     frame = gtk_frame_new(0);
     gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_OUT);
@@ -1883,11 +1914,40 @@
     vbox1 = gtk_vbox_new(TRUE, 0);
     gtk_container_add(GTK_CONTAINER(frame), vbox1);
 
-    ge->name = gtk_widget_new(gtk_entry_get_type(),
-                              "max_length", 128, NULL);
+    hbox = gtk_hbox_new(FALSE, 0);
+    gtk_box_pack_start(GTK_BOX(vbox1), hbox, TRUE, TRUE, 0);
+
+    ge->name = gtk_widget_new(gtk_entry_get_type(), "max_length", 128, NULL);
     mitem = labcon_new_label_defaults("Glyph Name:", ge->name, 0);
-    gtk_box_pack_start(GTK_BOX(vbox1), mitem, TRUE, TRUE, 0);
+    gtk_box_pack_start(GTK_BOX(hbox), mitem, TRUE, TRUE, 0);
+
+    /* Update button */
+    ge->button_update = gtk_button_new();
+    img = gtk_image_new_from_stock(GTK_STOCK_APPLY, GTK_ICON_SIZE_SMALL_TOOLBAR);
+    gtk_button_set_image(GTK_BUTTON(ge->button_update), img);
+    g_signal_connect(G_OBJECT(ge->button_update), "clicked", 
+		     G_CALLBACK(update_font), NULL);
+    gtk_box_pack_start(GTK_BOX(hbox), ge->button_update, FALSE, FALSE, 0);
+
+    /* Previous button */
+    ge->button_prev = gtk_button_new();
+    img = gtk_image_new_from_stock(GTK_STOCK_MEDIA_PREVIOUS, 
+		                   GTK_ICON_SIZE_SMALL_TOOLBAR);
+    gtk_button_set_image(GTK_BUTTON(ge->button_prev), img);
+    g_signal_connect(G_OBJECT(ge->button_prev), "clicked",
+		     G_CALLBACK(previous_glyph), NULL);
+    gtk_box_pack_start(GTK_BOX(hbox), ge->button_prev, FALSE, FALSE, 0);
+
+    /* Next button */
+    ge->button_next = gtk_button_new();
+    img = gtk_image_new_from_stock(GTK_STOCK_MEDIA_NEXT, 
+		                   GTK_ICON_SIZE_SMALL_TOOLBAR);
+    gtk_button_set_image(GTK_BUTTON(ge->button_next), img);
+    g_signal_connect(G_OBJECT(ge->button_next), "clicked", 
+		     G_CALLBACK(next_glyph), NULL);
+    gtk_box_pack_start(GTK_BOX(hbox), ge->button_next, FALSE, FALSE, 0);
 
+    /* Encoding */
     ge->encoding = gtk_label_new("0000");
     gtk_misc_set_alignment(GTK_MISC(ge->encoding), 0.0, 0.5);
     mitem = labcon_new_label_defaults("Encoding:", ge->encoding, mitem);
@@ -2048,14 +2108,29 @@
 
     if (grid->modified) {
         gtk_widget_set_sensitive(ge->update, TRUE);
+        gtk_widget_set_sensitive(ge->button_update, TRUE);
         gtk_widget_set_sensitive(ge->update_next, TRUE);
         gtk_widget_set_sensitive(ge->update_prev, TRUE);
     } else {
         gtk_widget_set_sensitive(ge->update, FALSE);
+        gtk_widget_set_sensitive(ge->button_update, FALSE);
         gtk_widget_set_sensitive(ge->update_next, FALSE);
         gtk_widget_set_sensitive(ge->update_prev, FALSE);
     }
 
+    /*
+     * Set the sensitivity of the next and previous buttons.
+     */
+    if (glyphedit_get_encoding(GLYPHEDIT(ge->gedit)) == 0)
+      gtk_widget_set_sensitive(ge->button_prev, FALSE);
+    else
+      gtk_widget_set_sensitive(ge->button_prev, TRUE);
+
+    if (glyphedit_get_encoding(GLYPHEDIT(ge->gedit)) == 0xffff)
+      gtk_widget_set_sensitive(ge->button_next, FALSE);
+    else
+      gtk_widget_set_sensitive(ge->button_next, TRUE);
+
     gtk_widget_show_all(ge->shell);
 
     /*
