diff --git a/src/math-display.c b/src/math-display.c
index 62f0218..9343cc3 100644
--- a/src/math-display.c
+++ b/src/math-display.c
@@ -74,15 +74,15 @@ display_key_press_cb(GtkWidget *widget, GdkEventKey *event, MathDisplay *display
     c = gdk_keyval_to_unicode(event->keyval);
 
     /* Solve on enter */
-    if (event->keyval == GDK_Return || event->keyval == GDK_KP_Enter) {
+    if (event->keyval == GDK_KEY_Return || event->keyval == GDK_KEY_KP_Enter) {
         math_equation_solve(display->priv->equation);
         return TRUE;
     }
 
     /* Clear on escape */
-    if ((event->keyval == GDK_Escape && state == 0) ||
-        (event->keyval == GDK_BackSpace && state == GDK_CONTROL_MASK) ||
-        (event->keyval == GDK_Delete && state == GDK_SHIFT_MASK)) {
+    if ((event->keyval == GDK_KEY_Escape && state == 0) ||
+        (event->keyval == GDK_KEY_BackSpace && state == GDK_CONTROL_MASK) ||
+        (event->keyval == GDK_KEY_Delete && state == GDK_SHIFT_MASK)) {
         math_equation_clear(display->priv->equation);
         return TRUE;
     }
@@ -107,34 +107,34 @@ display_key_press_cb(GtkWidget *widget, GdkEventKey *event, MathDisplay *display
     if (state == GDK_CONTROL_MASK) {
         switch(event->keyval)
         {
-        case GDK_bracketleft:
+        case GDK_KEY_bracketleft:
             math_equation_insert(display->priv->equation, "⌈");
             return TRUE;
-        case GDK_bracketright:
+        case GDK_KEY_bracketright:
             math_equation_insert(display->priv->equation, "⌉");
             return TRUE;
-        case GDK_e:
+        case GDK_KEY_e:
             math_equation_insert_exponent(display->priv->equation);
             return TRUE;
-        case GDK_f:
+        case GDK_KEY_f:
             math_equation_factorize(display->priv->equation);
             return TRUE;
-        case GDK_i:
+        case GDK_KEY_i:
             math_equation_insert(display->priv->equation, "⁻¹");
             return TRUE;
-        case GDK_p:
+        case GDK_KEY_p:
             math_equation_insert(display->priv->equation, "π");
             return TRUE;
-        case GDK_r:
+        case GDK_KEY_r:
             math_equation_insert(display->priv->equation, "√");
             return TRUE;
-        case GDK_u:
+        case GDK_KEY_u:
             math_equation_insert(display->priv->equation, "µ");
             return TRUE;
-        case GDK_minus:
+        case GDK_KEY_minus:
              math_equation_insert(display->priv->equation, "⁻");
              return TRUE;
-        case GDK_apostrophe:
+        case GDK_KEY_apostrophe:
              math_equation_insert(display->priv->equation, "°");
              return TRUE;
         }
@@ -142,10 +142,10 @@ display_key_press_cb(GtkWidget *widget, GdkEventKey *event, MathDisplay *display
     if (state == GDK_MOD1_MASK) {
         switch(event->keyval)
         {
-        case GDK_bracketleft:
+        case GDK_KEY_bracketleft:
             math_equation_insert(display->priv->equation, "⌊");
             return TRUE;
-        case GDK_bracketright:
+        case GDK_KEY_bracketright:
             math_equation_insert(display->priv->equation, "⌋");
             return TRUE;
         }
@@ -154,34 +154,34 @@ display_key_press_cb(GtkWidget *widget, GdkEventKey *event, MathDisplay *display
     if (state == GDK_CONTROL_MASK || math_equation_get_number_mode(display->priv->equation) == SUPERSCRIPT) {
         switch(event->keyval)
         {
-        case GDK_0:
+        case GDK_KEY_0:
             math_equation_insert(display->priv->equation, "⁰");
             return TRUE;
-        case GDK_1:
+        case GDK_KEY_1:
             math_equation_insert(display->priv->equation, "¹");
             return TRUE;
-        case GDK_2:
+        case GDK_KEY_2:
             math_equation_insert(display->priv->equation, "²");
             return TRUE;
-        case GDK_3:
+        case GDK_KEY_3:
             math_equation_insert(display->priv->equation, "³");
             return TRUE;
-        case GDK_4:
+        case GDK_KEY_4:
             math_equation_insert(display->priv->equation, "⁴");
             return TRUE;
-        case GDK_5:
+        case GDK_KEY_5:
             math_equation_insert(display->priv->equation, "⁵");
             return TRUE;
-        case GDK_6:
+        case GDK_KEY_6:
             math_equation_insert(display->priv->equation, "⁶");
             return TRUE;
-        case GDK_7:
+        case GDK_KEY_7:
             math_equation_insert(display->priv->equation, "⁷");
             return TRUE;
-        case GDK_8:
+        case GDK_KEY_8:
             math_equation_insert(display->priv->equation, "⁸");
             return TRUE;
-        case GDK_9:
+        case GDK_KEY_9:
             math_equation_insert(display->priv->equation, "⁹");
             return TRUE;
         }
@@ -189,34 +189,34 @@ display_key_press_cb(GtkWidget *widget, GdkEventKey *event, MathDisplay *display
     else if (state == GDK_MOD1_MASK || math_equation_get_number_mode(display->priv->equation) == SUBSCRIPT) {
         switch(event->keyval)
         {
-        case GDK_0:
+        case GDK_KEY_0:
             math_equation_insert(display->priv->equation, "₀");
             return TRUE;
-        case GDK_1:
+        case GDK_KEY_1:
             math_equation_insert(display->priv->equation, "₁");
             return TRUE;
-        case GDK_2:
+        case GDK_KEY_2:
             math_equation_insert(display->priv->equation, "₂");
             return TRUE;
-        case GDK_3:
+        case GDK_KEY_3:
             math_equation_insert(display->priv->equation, "₃");
             return TRUE;
-        case GDK_4:
+        case GDK_KEY_4:
             math_equation_insert(display->priv->equation, "₄");
             return TRUE;
-        case GDK_5:
+        case GDK_KEY_5:
             math_equation_insert(display->priv->equation, "₅");
             return TRUE;
-        case GDK_6:
+        case GDK_KEY_6:
             math_equation_insert(display->priv->equation, "₆");
             return TRUE;
-        case GDK_7:
+        case GDK_KEY_7:
             math_equation_insert(display->priv->equation, "₇");
             return TRUE;
-        case GDK_8:
+        case GDK_KEY_8:
             math_equation_insert(display->priv->equation, "₈");
             return TRUE;
-        case GDK_9:
+        case GDK_KEY_9:
             math_equation_insert(display->priv->equation, "₉");
             return TRUE;
         }
diff --git a/src/math-preferences.c b/src/math-preferences.c
index c846523..d2a3c58 100644
--- a/src/math-preferences.c
+++ b/src/math-preferences.c
@@ -239,7 +239,6 @@ create_gui(MathPreferencesDialog *dialog)
                          _("Preferences"));
     gtk_window_set_icon_name(GTK_WINDOW(dialog), "accessories-calculator");
     gtk_container_set_border_width(GTK_CONTAINER(dialog), 8);
-    gtk_dialog_set_has_separator(GTK_DIALOG(dialog), FALSE);
     gtk_dialog_add_button(GTK_DIALOG(dialog),
                           /* Label on close button in preferences dialog */
                           _("_Close"), 0);
diff --git a/src/math-window.c b/src/math-window.c
index 0daf030..14c32fd 100644
--- a/src/math-window.c
+++ b/src/math-window.c
@@ -372,14 +372,14 @@ create_menu(MathWindow *window)
     add_menu_item(menu, gtk_image_menu_item_new_from_stock(GTK_STOCK_COPY, accel_group), G_CALLBACK(copy_cb), window);
     add_menu_item(menu, gtk_image_menu_item_new_from_stock(GTK_STOCK_PASTE, accel_group), G_CALLBACK(paste_cb), window);
     menu_item = add_menu_item(menu, gtk_image_menu_item_new_from_stock(GTK_STOCK_UNDO, accel_group), G_CALLBACK(undo_cb), window);
-    gtk_widget_add_accelerator(menu_item, "activate", accel_group, GDK_z, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE);
+    gtk_widget_add_accelerator(menu_item, "activate", accel_group, GDK_KEY_z, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE);
     menu_item = add_menu_item(menu, gtk_image_menu_item_new_from_stock(GTK_STOCK_REDO, accel_group), G_CALLBACK(redo_cb), window);
-    gtk_widget_add_accelerator(menu_item, "activate", accel_group, GDK_z, GDK_CONTROL_MASK | GDK_SHIFT_MASK, GTK_ACCEL_VISIBLE);
+    gtk_widget_add_accelerator(menu_item, "activate", accel_group, GDK_KEY_z, GDK_CONTROL_MASK | GDK_SHIFT_MASK, GTK_ACCEL_VISIBLE);
     add_menu_item(menu, gtk_separator_menu_item_new(), NULL, NULL);
     add_menu_item(menu, gtk_image_menu_item_new_from_stock(GTK_STOCK_PREFERENCES, accel_group), G_CALLBACK(show_preferences_cb), window);
     add_menu_item(menu, gtk_separator_menu_item_new(), NULL, NULL);
     menu_item = add_menu_item(menu, gtk_image_menu_item_new_from_stock(GTK_STOCK_QUIT, accel_group), G_CALLBACK(quit_cb), window);
-    gtk_widget_add_accelerator(menu_item, "activate", accel_group, GDK_w, GDK_CONTROL_MASK, 0);
+    gtk_widget_add_accelerator(menu_item, "activate", accel_group, GDK_KEY_w, GDK_CONTROL_MASK, 0);
 
     menu = add_menu(window->priv->menu_bar, MODE_MENU_LABEL);
     window->priv->mode_basic_menu_item = add_menu_item(menu, radio_menu_item_new(&group, MODE_BASIC_LABEL), G_CALLBACK(mode_changed_cb), window);
@@ -393,7 +393,7 @@ create_menu(MathWindow *window)
 
     menu = add_menu(window->priv->menu_bar, HELP_MENU_LABEL);
     menu_item = add_menu_item(menu, gtk_menu_item_new_with_mnemonic(HELP_CONTENTS_LABEL), G_CALLBACK(help_cb), window);
-    gtk_widget_add_accelerator(menu_item, "activate", accel_group, GDK_F1, 0, GTK_ACCEL_VISIBLE);
+    gtk_widget_add_accelerator(menu_item, "activate", accel_group, GDK_KEY_F1, 0, GTK_ACCEL_VISIBLE);
     add_menu_item(menu, gtk_image_menu_item_new_from_stock(GTK_STOCK_ABOUT, accel_group), G_CALLBACK(about_cb), window);
 }
 
