2011-10-07 [colin] 3.7.10cvs21
[claws.git] / src / mainwindow.c
index 1ee266b085ce5eef22f1e2228f27a08a766147c9..6b6ea7d83ffc69850f605ab6347d6257165532be 100644 (file)
@@ -1091,7 +1091,7 @@ void mainwin_accel_changed_cb (GtkAccelGroup *accelgroup, guint keyval, GdkModif
                        GtkLabel *label = g_object_get_data(G_OBJECT(item), "accel_label");
                        gchar *new_accel;
                        
-                       if (keyval == GDK_BackSpace) {
+                       if (keyval == GDK_KEY_BackSpace) {
                                const gchar *accel_path;
 #if GTK_CHECK_VERSION(2,14,0)
                                accel_path = gtk_menu_item_get_accel_path(item);
@@ -1338,7 +1338,7 @@ static gboolean mainwindow_key_pressed (GtkWidget *widget, GdkEventKey *event,
        }
 
        switch (event->keyval) {
-       case GDK_Q:             /* Quit */
+       case GDK_KEY_Q:             /* Quit */
 #ifndef MAEMO
                BREAK_ON_MODIFIER_KEY();
 
@@ -1347,7 +1347,7 @@ static gboolean mainwindow_key_pressed (GtkWidget *widget, GdkEventKey *event,
                }
 #endif
                return FALSE;
-       case GDK_space:
+       case GDK_KEY_space:
                BREAK_ON_MODIFIER_KEY();
                if (gtk_window_is_active(GTK_WINDOW(mainwin->window))) {
                        if (mainwin->folderview != NULL && mainwin->summaryview != NULL
@@ -1363,14 +1363,14 @@ static gboolean mainwindow_key_pressed (GtkWidget *widget, GdkEventKey *event,
                break;
 
 #ifdef MAEMO
-       case GDK_F6:
+       case GDK_KEY_F6:
                if (maemo_mainwindow_is_fullscreen(widget)) {
                        gtk_window_unfullscreen(GTK_WINDOW(widget));
                 } else {
                        gtk_window_fullscreen(GTK_WINDOW(widget));
                 }
                break;
-       case GDK_F7:
+       case GDK_KEY_F7:
                {
                        PangoFontDescription *font_desc;
                        int size;
@@ -1394,7 +1394,7 @@ static gboolean mainwindow_key_pressed (GtkWidget *widget, GdkEventKey *event,
                        pango_font_description_free(font_desc);
                }
                break;
-       case GDK_F8:
+       case GDK_KEY_F8:
                {
                        PangoFontDescription *font_desc;
                        int size;
@@ -1418,7 +1418,7 @@ static gboolean mainwindow_key_pressed (GtkWidget *widget, GdkEventKey *event,
                        pango_font_description_free(font_desc);
                }
                break;
-       case GDK_Escape:
+       case GDK_KEY_Escape:
                if (mainwin->summaryview && 
                    mainwin->summaryview->ext_messageview && 
                    mainwin->summaryview->ext_messageview->window && 
@@ -1553,9 +1553,11 @@ MainWindow *main_window_create()
        FolderView *folderview;
        SummaryView *summaryview;
        MessageView *messageview;
+#if !GTK_CHECK_VERSION(3, 0, 0)
        GdkColormap *colormap;
-       GdkColor color[4];
        gboolean success[4];
+#endif
+       GdkColor color[4];
        GtkWidget *ac_menu;
        gint i;
 
@@ -2206,12 +2208,14 @@ MainWindow *main_window_create()
        color[2] = folderview->color_new;
        color[3] = folderview->color_op;
 
+#if !GTK_CHECK_VERSION(3, 0, 0)
        colormap = gdk_drawable_get_colormap(gtk_widget_get_window(window));
        gdk_colormap_alloc_colors(colormap, color, 4, FALSE, TRUE, success);
        for (i = 0; i < 4; i++) {
                if (success[i] == FALSE)
                        g_warning("MainWindow: color allocation %d failed\n", i);
        }
+#endif
 
        debug_print("done.\n");